monks/font_palette

The font-palette CSS property allows specifying one of the many palettes contained in a color font that a user agent may use for the font. Users can also override the values in a palette or create a new palette by using the @font-palette-values at-rule.

A font-palette palette takes precedence when coloring a font. The {{cssxref(“color”)}} property will not override a font palette, even if specified with {{cssxref(“important”, “!important”)}}.

Values

pub const dark: #(String, String)
  • : Specifies the first palette in the font that matches ‘dark’ to be used for the font. Some fonts contain metadata that identify a palette as applicable for a dark (close to black) background. If a font does not have this metadata, the value behaves as normal.
pub const inherit: #(String, String)
pub const initial: #(String, String)
pub const light: #(String, String)
  • : Specifies the first palette in the font that matches ‘light’ to be used for the font. Some fonts contain metadata that identify a palette as applicable for a light (close to white) background. If a font does not have this metadata, the light value behaves as normal.
pub const normal: #(String, String)
  • : Specifies the default color palette or the default glyph colorization (set by the font maker) to be used for the font. With this setting, the palette in the font at index 0 is rendered.
pub fn raw(value: String) -> #(String, String)

Enter a raw string value for font-palette

pub const revert: #(String, String)
pub const revert_layer: #(String, String)
pub const unset: #(String, String)
pub fn var(variable: String) -> #(String, String)

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

Search Document