Skip to content

Commit 3cf44eb

Browse files
committed
[css-fonts-4] Color palettes have to always be complete
1 parent e2cb7a6 commit 3cf44eb

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

css-fonts-4/Overview.bs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6348,6 +6348,10 @@ User-defined font color palettes: The ''@font-palette-values'' rule</h3>
63486348
In addition, it allows overriding a set of colors from a palette in the font
63496349
with colors described by the web author.
63506350

6351+
A palette is always <i>complete</i>, meaning that it is impossible to describe
6352+
a palette which has missing colors. If colors would be missing, they are taken
6353+
from the palette within the font identified by the 'base-palette' descriptor.
6354+
63516355
The ''@font-palette-values'' rule consists of the ''@font-palette-values'' at-keyword
63526356
followed by a block of descriptor declarations.
63536357
It has the following syntax:
@@ -6540,7 +6544,7 @@ Specifying the base palette: the 'base-palette' descriptor</h4>
65406544
If a font does not contain any color palettes,
65416545
no colors are included in the initial color palette
65426546
represented by this ''@font-palette-values'' rule.
6543-
Colors can be added to the color palette
6547+
Colors in the palette can be overridden
65446548
by using the 'override-color!!descriptor' descriptor in the ''@font-palette-values'' rule.
65456549

65466550
Strings specified in the value of this descriptor
@@ -6557,7 +6561,7 @@ Overriding a colors from a palette: The 'override-colors!!descriptor' descriptor
65576561
Initial: N/A
65586562
</pre>
65596563

6560-
This descriptor overrides or adds colors
6564+
This descriptor overrides colors
65616565
to the initial color palette represented by this ''@font-palette-values'' rule.
65626566

65636567
The '@font-palette-values/override-colors' descriptor takes
@@ -6566,11 +6570,8 @@ Overriding a colors from a palette: The 'override-colors!!descriptor' descriptor
65666570
an entry into the palette an a color to replace it with.
65676571

65686572
For each key/value pair in the value of this descriptor,
6569-
if the initial color palette represented by the ''@font-palette-values'' rule
6570-
(i.e. by using the 'base-palette' descriptor)
6571-
already includes a color at the index of the key,
6572-
that color is overwritten by the color specified in this descriptor's value.
6573-
Otherwise, a new color is added to this color palette at the index of the key.
6573+
the color with that key in the initial palette (i.e. by using the 'base-palette' descriptor)
6574+
is overwritten by the color specified in this descriptor's value.
65746575

65756576
Palette index entries
65766577
in the ''@font-palette-values/override-colors'' descriptor

0 commit comments

Comments
 (0)