Update styles: admonitions, examples, tabs #348
+111
−94
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Broadly, aiming to sprinkle a little design system thinking onto these elements.
The trigger was running a quick lighthouse check and finding that we could improve contrast between text and background in admonitions. So they now all have the same font color as body text, and use a complimentary colour for link text in the admonition. A border is added, and border-radius.
This could be extended by moving the icon and text representing the admonition type into the box, but it requires a little more work, because asciidoctor outputs admonitions as a table. An option here is to use js to replace the table layout with divs and style those divs. It could also be that while admonitions in the docs are roughly equivalent to a type of banner in the design system, we don't necessarily need to copy the exact style: the banner we are copying would only ever contain at most a few lines of text, whereas admonitions in docs can be longer and contain mixed content types.
Example blocks get a docs colour border + border radius and a cleaner style for titles.
Tabbed sections have been updated to remove the index card style and also have a docs color border.