Mallard Style Hints in Yelp

All elements in Mallard allow a style attribute that takes a space-separated list of style hints. Style hints may affect how a tool processes an element. They are non-normative, and tools are free to support any style hints they choose. Elements may list more than one style hint. In some cases, only a single hint is used. In other cases, hints may be combined.

Inline Styles

em/@style = "strong"

The "strong" style hint on the inline em element makes text bold instead of italic.

keyseq/@style = "hyphen"

The "hyphen" style hint on the inline keyseq element causes a hyphen to be used instead of a plus sign as the key separator.

link/@style = "button"

The "button" style hint on the inline link element causes the link to look like a button. This should usually be used for action links.

output/@style = "error"
output/@style = "prompt"

The inline output element can take the style hints "error" and "prompt" to indicate that the text is an error message or the command prompt, respectively. This is most useful inside a screen element.

Block Styles

title/@style = "heading"

The "heading" style on a block title element (that is, not a title of a page or section) causes the title to be formatted large, as if it were a section title. Normally block titles are at the normal font size.

title/@style = "center"

The "center" style on a block title element (that is, not a title of a page or section) causes the title to be centered. Normally block titles are aligned left, or aligned right for RTL locales.

title/@style = "hidden"

The "hidden" style on page and section titles causes the title to not be displayed. Titles are mandatory on pages and sections, but occasionally with certain specialty styles, it's useful to hide them.

Since 3.12

desc/@style = "center"

The "center" style on a block desc element (that is, not one found in an info element) causes the desc to be centered. Normally block descs are aligned left, or aligned right for RTL locales.

code/@style = "numbered"
screen/@style = "numbered"

The block code and screen elements can both take the "numbered" style hint to show line numbers.

note/@style = "advanced"
note/@style = "bug"
note/@style = "important"
note/@style = "plain"
note/@style = "sidebar"
note/@style = "tip"
note/@style = "warning"

The note element can take any of the preceding hints to determine which icon is used. The special "sidebar" style hint causes the note to be rendered as a non-intrusive box along the side of the text. The "plain" style removes icons and extra accessible information for a simple box with a background color.

list/@style = "compact"
terms/@style = "compact"

On list and terms elements, using the "compact" style hint reduces the amount of vertical padding around list items. This is best used for lists of words or short phrases.

list/@style = "continues"
steps/@style = "continues"

On list and steps elements, using the "continues" style hint causes the list to start numbering where the previous compatible list left off, just like the DocBook continuation attribute. For a steps element, the previous compatible element is the first preceding steps element. For a list element, the previous compatible element is the first preceding list element with the same type attribute.

tree/@style = "lines"

The "lines" style hint on the tree element causes lines to be drawn to show the hierarchy.

media/@style = "floatstart"
media/@style = "floatend"
media/@style = "floatleft"
media/@style = "floatright"

A block media element can be floated to the left or right using the corresponding style hint. You should generally prefer the "floatstart" and "floatend" hints. They behave just like "floatleft" and "floatright", except that they flip automatically for right-to-left locales.