-
Notifications
You must be signed in to change notification settings - Fork 322
Tweak inline code and preformatted blocks #4683
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
base: main
Are you sure you want to change the base?
Conversation
Adds a contrasting border to preformatted blocks (mainly for code blocks, but a few others), gives a subtle style to inline code elements in prose Relates to #4193
✅ Deploy Preview for wcag2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
2cc1376
to
24df714
Compare
@kfranqueiro do changes to CSS not get reflected in preview? https://deploy-preview-4683--wcag2.netlify.app/techniques/html/h85 |
Thank you, Mario, but our CSS is in another castle!
|
Thanks for the pointer @kfranqueiro ... updated, and the preview now shows up my change :) |
Hmm, yeah, to @kfranqueiro’s point, these two consecutive code blocks in ARIA19’s Example #1 appear to be one. Perhaps some explicit Or does those two |
Example of |
RE multiple I guess there's also still the question of whether the styles are worth the trouble, since I think we had a few votes of ambivalence or actual -1 in the issue. On that note, some other edge cases to consider for inline code:
|
For things like multiple code blocks in a single Regarding ditto things like |
I think I caught all instances where we have two |
I'll add here that we can also soften the border around the EDIT: done that with the next commit Example (zoomed out to show both the "About this technique" and a newly styled code block): Obviously personal preference on whether or not these styles are even worth pursuing, but for my own part, I find them much more immediately "skimmable" as I read through a technique, seeing exactly where code blocks are, where HTML elements/attributes are being mentioned (rather than only finding them by carefully reading a sentence), etc. Arguably yes, because these styles are not all |
thanks for spotting the |
Adds a contrasting border to preformatted blocks (mainly for code blocks, but a few others), gives a subtle style to inline code elements in prose
Relates to #4193 and applies suggestion 1 (the box around the
pre
) and a slightly tweaked variant of suggestion 2b (the "subtle" style forcode
, with some extra selector shenanigans to avoid having the background when it's inside a link or already in apre
block)EDIT: as a quick before/after, see https://www.w3.org/WAI/WCAG22/Techniques/html/H85 and the preview here https://deploy-preview-4683--wcag2.netlify.app/techniques/html/h85