You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CSS classes, tag specific css, styles, css, themes
Problem
When building/customizing styling in documentation, there may be tags that you want to style differently than others because of the kinds of info they represent. This allows a team to customize to their styles to achieve their documentation goals, rather than building a custom theme to achieve similar effects.
For example, let's say a team decides to utilize a custom tag like @todo in their documentation, indicating an action that is still waiting to be accomplished. Being able to single out tags labeled as todo with distinct styling gives the team an opportunity to increase/decrease visibility on this information without having to do more than add a custom stylesheet to the config.
Additionally, wrapping individual tags in a div groups content together in a way that would allow a team to utilize pseudo classes like :nth-child or :first-of-type, giving more flexibility in styling pages.
Suggested Solution
There may be additional places where this can be utilized, but the one that is working best for my team is in themes/default/partials/comment.tsx, update the tag.map return from:
The h4 and markdown info has been wrapped in a div tag with a css class derived from the tag being processed. If no styling is defined for that specific tag, then it just renders like any other.
The text was updated successfully, but these errors were encountered:
Search Terms
CSS classes, tag specific css, styles, css, themes
Problem
When building/customizing styling in documentation, there may be tags that you want to style differently than others because of the kinds of info they represent. This allows a team to customize to their styles to achieve their documentation goals, rather than building a custom theme to achieve similar effects.
For example, let's say a team decides to utilize a custom tag like
@todo
in their documentation, indicating an action that is still waiting to be accomplished. Being able to single out tags labeled astodo
with distinct styling gives the team an opportunity to increase/decrease visibility on this information without having to do more than add a custom stylesheet to the config.Additionally, wrapping individual tags in a div groups content together in a way that would allow a team to utilize pseudo classes like
:nth-child
or:first-of-type
, giving more flexibility in styling pages.Suggested Solution
There may be additional places where this can be utilized, but the one that is working best for my team is in themes/default/partials/comment.tsx, update the tag.map return from:
to something like this:
The
h4
and markdown info has been wrapped in a div tag with a css class derived from the tag being processed. If no styling is defined for that specific tag, then it just renders like any other.The text was updated successfully, but these errors were encountered: