monks/font_variant_position

The font-variant-position CSS property controls the use of alternate, smaller glyphs that are positioned as superscript or subscript.

The glyphs are positioned relative to the baseline of the font, which remains unchanged. These glyphs are typically used in {{HTMLElement(“sub”)}} and {{HTMLElement(“sup”)}} elements.

When the usage of these alternate glyphs is activated, if one character in the run doesn’t have such a typographically-enhanced glyph, the whole set of characters of the run is rendered using a fallback method, synthesizing these glyphs.

These alternate glyphs share the same em-box and the same baseline as the rest of the font. They are merely graphically enhanced, and have no effect on the line-height and other box characteristics.

Values

pub const inherit: #(String, String)
pub const initial: #(String, String)
pub const normal: #(String, String)
  • : Deactivates alternate superscript and subscript glyphs.
pub fn raw(value: String) -> #(String, String)

Enter a raw string value for font-variant-position

pub const revert: #(String, String)
pub const revert_layer: #(String, String)
pub const sub: #(String, String)
  • : Activates subscript alternate glyphs. If, in a given run, one such glyph is not available for a character, all the characters in the run are rendered using synthesized glyphs.
pub const super: #(String, String)
  • : Activates superscript alternate glyphs. If, in a given run, one such glyph is not available for a character, all the characters in the run are rendered using synthesized glyphs.
pub const unset: #(String, String)
pub fn var(variable: String) -> #(String, String)

Enter a variable name to be used for font-variant-position. It will be wrapped in var() and have -- prepended.

Search Document