Tag¶
About¶
The tag
and tags
roles are shortcuts to the bdg
badge roles of
sphinx{design}, see Badges.
Details¶
The idea is to reduce markup code for defining “tag”-like badges within the
Info Card element. All of them will use the outline
option flag
by default, to give them a corresponding visual appearance like demonstrated below.
There are two roles: {tag}
and {tags}
. A {tag}
will render its text content
1:1 into a single badge element, while {tags}
will split the text by comma (,
),
and renders the outcome using multiple badge elements.
Synopsis¶
Description
Appearance
MyST syntax
rST syntax
Single tag
foo, bar
{tag}`foo, bar`
:tag:`foo, bar`
Multiple tags
foo bar
{tags}`foo, bar`
:tags:`foo, bar`
Color variants¶
All colors of badges are supported, by appending a color label from the list of semantic colors as a suffix to the role name, like presented below.
Description
Appearance
MyST syntax
Primary and secondary
foo bar
foo bar
{tags-primary}`foo, bar` \
{tags-secondary}`foo, bar`
Admonitions
foo bar
foo bar
foo bar
foo bar
{tags-success}`foo, bar` \
{tags-info}`foo, bar` \
{tags-warning}`foo, bar` \
{tags-danger}`foo, bar`
Light to dark
foo bar
foo bar
foo bar
foo bar
foo bar
{tags-white}`foo, bar` \
{tags-light}`foo, bar` \
{tags-muted}`foo, bar` \
{tags-dark}`foo, bar` \
{tags-black}`foo, bar`
Note
While the table above only presents Markdown syntax, reStructuredText syntax is also supported.
REVIEW! foo bar
:tag-warning:`REVIEW!`
:tags-primary:`foo, bar`
This page is written in Markedly Structured Text (MyST Markdown).