Template:Typography

From Hollow Knight Wiki
Jump to navigation Jump to search
[view] [edit] [history] [refresh]Documentation

A template for customizing text with various colors and formats.

Usage

Required parameters only, in horizontal format
{{Typography|text=}}
Full parameter set in horizontal format
{{Typography|tag=|id=|style=|type=|emphasis=|inverse=|color=|truncate=|smooth=|text=}}

A template for customizing text with various colors and formats.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
element tagtag

Tag/element type that will wrap the output text. Valid values can be seen in Community Central.*

Default
span
Stringsuggested
idid

Id of the resulting HTML element.

Stringoptional
stylestyle

Inline CSS styles of the resulting HTML element.

Stringoptional
text typetype

Type scale of the resulting text. You can see each type scale in the Sandbox's typography system section.** Valid values: headline1 (h1), headline2 (h2), headline3 (h3), headline4 (h4), headline5 (h5), headline6 (h6), subtitle1 (s1), subtitle2 (s2), body1 (b1), body2 (b2), caption (c), button (b), overline (o), footnote (f).

Stringoptional
text emphasisemphasis

The opacity level of the resulting text. You can see examples in the Sandbox's hierarchy section.*** Valid values: on-background (onbg), primary (p, high [h]), secondary (s, medium [m]), and disabled (d).

Stringoptional
insert text colorinverse

If set to "yes", it will set the text's color to be the opposite one (doesn't apply to text that uses the color parameter).

Stringoptional
text colorcolor

Color of the resulting text. Examples can be seen in the Sandbox's color section.**** Valid values: red, pink, purple, deep-purple, indigo, blue, light-blue, cyan, teal, green, light-green, lime, yellow, amber, orange, deep-orange, brown, grey, gray, blue-grey, and blue-gray.

Stringoptional
truncate texttruncate

Whether the text will truncate showing ellipsis at the end of it if it's length is higher than the container's width and height. Valid values: ellipsis (e), ellipsis-flex (ef) Use "ellipsis-flex" (or "ef") if the container is a flex element.

Stringoptional
smooth textsmooth

If set to "yes", it will apply anti-aliasing when fonts are rendered.*****

Stringoptional
texttext

String with the resulting text. May include wikitext/html.

Stringrequired

References

  1. * Allowed HTML tags
  2. ** Project:Sandbox § Typography system
  3. *** Project:Sandbox § Hierarchy
  4. **** Project:Sandbox § Colors
  5. ***** font-smooth information on MDC Web Docs
  6. [view] [edit] [history] [refresh]The above documentation is transcluded from Template:Typography/doc.