Skip to content

Commit e2cb7a6

Browse files
committed
[css-fonts-4] Rearrange prose regarding override-colors
1 parent 676a597 commit e2cb7a6

1 file changed

Lines changed: 21 additions & 25 deletions

File tree

css-fonts-4/Overview.bs

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6557,22 +6557,20 @@ Overriding a colors from a palette: The 'override-colors!!descriptor' descriptor
65576557
Initial: N/A
65586558
</pre>
65596559

6560-
This descriptor overrides or adds a color
6560+
This descriptor overrides or adds colors
65616561
to the initial color palette represented by this ''@font-palette-values'' rule.
6562-
If the initial color palette represented by the ''@font-palette-values'' rule
6563-
(i.e. by using the 'base-palette' descriptor)
6564-
already includes a color at the index of this descriptor's key,
6565-
that color is overwritten by the color specified in this descriptor's value.
6566-
Otherwise, a new color is added to this color palette at the index of this descriptor's key.
6567-
6568-
Each item in the comma-separated list represents
6569-
a tuple of
6570-
an entry into the palette
6571-
an a color to replace it with.
65726562

65736563
The '@font-palette-values/override-colors' descriptor takes
6574-
a comma-separated list
6575-
of palette index entries and colors.
6564+
a comma-separated list of palette index entries and colors.
6565+
Each item in the comma-separated list represents a tuple of
6566+
an entry into the palette an a color to replace it with.
6567+
6568+
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.
65766574

65776575
Palette index entries
65786576
in the ''@font-palette-values/override-colors'' descriptor
@@ -6581,25 +6579,23 @@ Overriding a colors from a palette: The 'override-colors!!descriptor' descriptor
65816579
in the selected palette.
65826580

65836581
Strings specified in the value of this descriptor
6584-
are matched
6585-
according to [[#localized-name-matching]].
6582+
are matched according to [[#localized-name-matching]].
65866583

65876584
Integer values are zero-indexed.
65886585

65896586
Using CSS Variables is explicitly expected to be valid in the value of this descriptor.
6590-
Using CSS Variables is disallowed in the key of this descriptor.
65916587
CSS Variables are resolved in the context of the element to which the 'font-palette' property applies.
6592-
This means that using 'font-palette' with the same value on two different elements
6588+
6589+
Note: This means that using 'font-palette' with the same value on two different elements
65936590
might result in different used palettes
65946591
because the value of variables inside the ''@font-palette-values'' rule
6595-
might apply differently in the context of those two elements.
6596-
6597-
The colors specified
6598-
in versions 0 and 1 of the CPAL table
6599-
are in sRGB.
6600-
Colors provided from CSS
6601-
(as overrides, or as new entries)
6602-
may use any supported colorspace.
6592+
might apply differently in the context of those two elements.
6593+
6594+
Colors provided from CSS
6595+
(as overrides, or as new entries)
6596+
may use any supported colorspace.
6597+
6598+
Note: The colors specified in versions 0 and 1 of the CPAL table are in sRGB.
66036599

66046600
<!--
66056601
████████ ██ ██ ███████ ██ ████

0 commit comments

Comments
 (0)