Skip to content

Commit 1c74611

Browse files
authored
Merge pull request #6679 from litherum/override-color-light-dark
[css-fonts] [palettes] base-palette should be able to reference "dark" or "light" (just like font-palette can)
2 parents 09b3c45 + 6c294d6 commit 1c74611

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

css-fonts-4/Overview.bs

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6466,14 +6466,42 @@ Specifying the base palette: the 'base-palette' descriptor</h4>
64666466

64676467
<pre class='descdef'>
64686468
Name: base-palette
6469-
Value: <<integer [0, ∞]>> | <<string>>
6469+
Value: light | dark | <<integer [0, ∞]>> | <<string>>
64706470
For: @font-palette-values
64716471
Initial: N/A
64726472
</pre>
64736473

6474-
The ''@font-palette-values/base-palette'' descriptor accepts either
6475-
a (zero-based) numerical palette index, or
6476-
a string, which corresponds to a named palette.
6474+
<dl dfn-for=base-palette dfn-type=value>
6475+
<dt><dfn>light</dfn>
6476+
<dd>
6477+
Some color font formats include metadata
6478+
marking certain palettes as applicable on a light (close to white) background.
6479+
This keyword identifies the first available palette in the font file marked this way.
6480+
If the font file format does not account for this metadata,
6481+
or no palette in the font is marked this way,
6482+
this value behaves as 0.
6483+
6484+
6485+
<dt><dfn>dark</dfn>
6486+
<dd>
6487+
Some color font formats include metadata
6488+
marking certain palettes as applicable on a dark (close to black) background.
6489+
This keyword identifies the first available palette in the font file marked this way.
6490+
If the font file format does not account for this metadata,
6491+
or no palette in the font is marked this way,
6492+
this value behaves as 0.
6493+
6494+
6495+
<dt><dfn type><<integer>></dfn>
6496+
<dd>
6497+
Identifies a (zero-based) numerical palette index within the font.
6498+
6499+
6500+
<dt><dfn type><<string>></dfn>
6501+
<dd>
6502+
Identifies a named palette within the font.
6503+
6504+
</dl>
64776505

64786506
<div class="example">
64796507
Modify Banner Flag's color palette

0 commit comments

Comments
 (0)