CSS @font-palette-values Rule
Example
Customize the default values of a font-palette:
@font-palette-values --greenAndYellow {
font-family: "Bungee Spice";
override-colors: 0 yellow, 1 green;
}
@font-palette-values --pinkAndGray
{
font-family: "Bungee Spice";
override-colors: 0 hotpink,
1 gray;
}
.alt1 {
font-palette: --greenAndYellow;
}
.alt2 {
font-palette: --pinkAndGray;
}
Try it Yourself »
Definition and Usage
The CSS @font-palette-values
rule is used to
customize the default values of a font-palette.
Browser Support
The numbers in the table specify the first browser version that fully supports the at-rule.
At-rule | |||||
---|---|---|---|---|---|
@font-palette-values | 101 | 101 | 107 | 15.4 | 87 |
CSS Syntax
@font-palette-values --identifier {
one or more descriptors
}
Property Values
Value | Description |
---|---|
font-family | Defines the font family name this palette can be applied to |
base-palette | Defines the name or index of the base palette to use |
override-colors | Defines the colors in the base palette to override |