-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work with standard structural HTML eg. Markdown output #1833
Comments
I rendered the above Markdown with the <h1 id="pithy-title">Pithy title</h1>
<p>Rambling paragraph</p>
<blockquote>
<p class="last-child">Quote from Shakespeare</p>
</blockquote>
<h2 id="shopping-list">Shopping list</h2>
<ul>
<li>Eggs</li>
<li>Bacon</li>
<li>Facemask</li>
</ul> Whilst some HTML attributes have been added, no classes with rules here are added. |
The design system repository has some code you could use to do this. See https://github.com/alphagov/govuk-design-system/blob/master/src/stylesheets/main.scss#L274 where you should find this:
If you then put this I believe the decision to not style top level elements was probably done to reduce the likelihood of conflicting with anything else that may be on the page. But by introducing it in a confined area you should be safe enough. See also -> #778 |
Thanks @andymantell, it appears that the mapping I asked about is at least partially defined there. The relationship between this repo and the |
The The design system repo contains additional code which is just for the purposes of that website alone - for example you won't find styles for the grey navigation bar or the sub navigation in this repository. The above snippet for introducing prose scope is fairly safe but if you want to stick 100% with the stuff that's in You might find you can do something similar for whatever markdown library you are using. |
Thanks for clarifying, very helpful. As a side note, the README for
Thanks for linking to your extension, I might refer to it if needed. However, that's exactly the type of thing I was trying to avoid doing in posting my question here! The workflow I envisioned was
It looks like I can't get a release of usable CSS (ie. not Sass) that fits into my workflow above. Closing this issue. |
To clarify - I am not from GDS, I was just in the vicinity and thought I would help. If you think the readme needs improvement it might be worth leaving this ticket open, or opening one specifically to get the readme improved. |
Yep, I got that. Much appreciated
|
The following Markdown
produces the following structured, accessible HTML markup
.
None of the bog-standard HTML elements generated above have CSS rules in the stylesheets offered here.
It appears there might be a mapping from the structural HTML elements to CSS classes used here (for example HTML's
h1
could map togovuk-heading-xl
insrc/govuk/core/_typography.scss
here).The text was updated successfully, but these errors were encountered: