@@ -6963,13 +6963,14 @@ as well as the colored versions.
6963
6963
6964
6964
6965
6965
Name : font-palette
6966
- Value : normal | light | dark | <>
6966
+ Value : normal | light | dark | <> | <>
6967
6967
Initial : normal
6968
6968
Applies to : all elements and text
6969
6969
Inherited : yes
6970
6970
Percentages : N/a
6971
- Computed value : specified keyword or identifier
6972
- Animation type : discrete
6971
+ Computed value : specified keyword, identifier or <> function.
6972
+ <> must be simplified to a single keyword or identifier if resulting palette is equivalent.
6973
+ Animation type : by computed value
6973
6974
6974
6975
6975
6976
@@ -7022,6 +7023,12 @@ Animation type: discrete
7022
7023
parsing/font-palette-valid.html
7023
7024
7024
7025
7026
+ With the
palette-mix() function defined as follows:
7027
+
7028
+
7029
+ palette-mix() = palette-mix(<> , [ [normal | light | dark | <> | <> ] && <> ? ]#{2})
7030
+
7031
+
7025
7032
7026
7033
normal
7027
7034
@@ -7073,6 +7080,25 @@ Animation type: discrete
7073
7080
be a modification of an existing palette already present in the font,
7074
7081
or be an entirely new palette.
7075
7082
7083
+
7084
+
7085
+ This value defines a position in the interpolation between two palette values,
7086
+ identified by
<> , by the palette keywords
7087
+ ''font-palette/normal'' , ''font-palette/light'' , ''font-palette/dark'' ,
7088
+
7089
+
7090
+ The glyphs of the font must be rendered with a palette that is created by
7091
+ interpolating for each palette color index between the matching color indices
7092
+ of the first and second palette specified as arguments,
7093
+ recursively resolving
<> functions if needed.
7094
+
7095
+ For each palette color, the interpolation follows
7096
+ the rules of the <> function.
7097
+
7098
+ When not specified otherwise the <> is
7099
+
in ''oklab'' as recommended by [[css-color-5#interpolation-space]] .
7100
+
7101
+ Percentages are normalized according to [[css-color-5#color-mix-percent-norm]] .
7076
7102
7077
7103
7078
7104
Note: The names 'light' and 'dark' describe the background the color palette is usable on,
@@ -7083,7 +7109,39 @@ Note: The names 'light' and 'dark' describe the background the color pale
7083
7109
.banner {font-palette: dark;
7084
7110
}
7085
7111
}
7086
-
7112
+
7113
+
7114
+
7115
+
7116
+ Animate between palettes.
7117
+
7118
+
7119
+ @font-palette-values --pink {
7120
+ font-family: Nabla;
7121
+ base-palette: 1;
7122
+ }
7123
+ @font-palette-values --yellow {
7124
+ font-family: Nabla;
7125
+ base-palette: 7;
7126
+ }
7127
+ @keyframes animate-palette {
7128
+ from {
7129
+ font-palette: --yellow;
7130
+ }
7131
+ to {
7132
+ font-palette: --pink;
7133
+ }
7134
+ }
7135
+ p {
7136
+ font-family: Nabla;
7137
+ animation: animate-palette 1.4s infinite alternate linear;
7138
+ }
7139
+
7140
+
7141
+
7142
+
7143
+ Nabla Color by typearture.com - animating between palettes 1 and 7 in the font.
7144
+
7087
7145
7088
7146
7089
7147
0 commit comments