Skip to content

Commit 03b05c3

Browse files
committed
[css-fonts-4] First pass at named palette entries for w3c#1125
1 parent d53f0f1 commit 03b05c3

1 file changed

Lines changed: 41 additions & 11 deletions

File tree

css-fonts-4/Overview.bs

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4039,18 +4039,48 @@ It has the following syntax:
40394039

40404040
The ''@font-palette-values'' rule accepts the descriptors defined in this specification.
40414041

4042-
<div class="example">
4043-
Modify Handover Sans's color palette
4042+
The '@font-palette-values/override-color' descriptor takes
4043+
a comma-separated list
4044+
of palette index entries and colors.
40444045

4045-
<pre>
4046-
@font-palette-values Augusta {
4047-
font-family: Handover Sans;
4048-
base-palette: 3;
4049-
color-1: rgb(43, 12, 9);
4050-
color-3: var(--highlight);
4051-
}
4052-
</pre>
4053-
</div>
4046+
<div class="example">
4047+
Modify Handover Sans's color palette
4048+
4049+
<pre>
4050+
@font-palette-values Augusta {
4051+
font-family: Handover Sans;
4052+
base-palette: 3;
4053+
override-color:
4054+
1 rgb(43, 12, 9),
4055+
3 var(--highlight);
4056+
}
4057+
</pre>
4058+
</div>
4059+
4060+
The ''@font-palette-values/base-palette'' descriptor accepts either
4061+
a (zero-based) numerical palette index, or
4062+
a string, which corresponds to a named palette.
4063+
4064+
Palette index entries
4065+
in the ''@font-palette-values/override-color'' descriptor
4066+
are either a (zero-based) palette index entry, or
4067+
a string, which corresponds to a named palette entry
4068+
in the selected palette.
4069+
4070+
<div class="example">
4071+
Modify Banner Flag's color palette
4072+
4073+
<pre>
4074+
@font-palette-values Festival {
4075+
font-family: Banner Flag;
4076+
base-palette: 'Dark';
4077+
override-color:
4078+
'Outline' rgb(123, 64, 27),
4079+
'Base Glyph' currentColor,
4080+
'Glints' var(--highlight);
4081+
}
4082+
</pre>
4083+
</div>
40544084

40554085
The presence of a particular descriptor within in ''@font-palette-values'' has semantic meaning;
40564086
missing descriptors are not filled in with default values.

0 commit comments

Comments
 (0)