Skip to content

Commit 13e7532

Browse files
committed
[fonts-4] Define @font-palette-values with Syntax grammar.
1 parent e77f641 commit 13e7532

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

css-fonts-4/Overview.bs

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2724,21 +2724,15 @@ with colors described by the web author.
27242724

27252725
The ''@font-palette-values'' rule consists of the ''@font-palette-values'' at-keyword
27262726
followed by a block of descriptor declarations.
2727-
In terms of the grammar, this specification defines the following productions:
2727+
It has the following syntax:
27282728

2729-
<pre>
2730-
<dfn>font_palette_values_rule</dfn>
2731-
: <a>FONT_PALETTE_VALUES_SYM</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner"><a>S</a></a>* '{' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner"><a>S</a></a>* <a>descriptor_declaration</a>? [ ';' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner"><a>S</a></a>* <a>descriptor_declaration</a>? ]* '}' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner"><a>S</a></a>*
2732-
;
2733-
2734-
<dfn>descriptor_declaration2</dfn>
2735-
: <a href="https://www.w3.org/TR/CSS21/grammar.html#grammar"><a>property</a></a> ':' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner"><a>S</a></a>* <a href="https://www.w3.org/TR/CSS21/grammar.html#grammar"><a>expr</a></a>
2736-
;
2729+
<pre class=prod>
2730+
@font-palette-values {
2731+
<<declaration-list>>
2732+
}
27372733
</pre>
27382734

2739-
The following new token is introduced:
2740-
2741-
<pre>@{F}{O}{N}{T}{-}{P}{A}{L}{E}{T}{T}{E}{-}{V}{A}{L}{U}{E}{S} {return <dfn>FONT_PALETTE_VALUES_SYM</dfn>;}</pre>
2735+
The ''@font-palette-values'' rule accepts the descriptors defined in this specification.
27422736

27432737
<div class="example">
27442738
Modify Handover Sans's color palette
@@ -2755,7 +2749,7 @@ The following new token is introduced:
27552749

27562750
The presence of a particular descriptor within in ''@font-palette-values'' has semantic meaning;
27572751
missing descriptors are not filled in with default values.
2758-
These descriptors apply solely within the context of the @font-palette-values rule in which they are defined,
2752+
These descriptors apply solely within the context of the ''@font-palette-values'' rule in which they are defined,
27592753
and do not apply to document language elements.
27602754
When a given descriptor occurs multiple times in a given ''@font-palette-values'' rule,
27612755
only the last descriptor declaration is used
@@ -2776,9 +2770,9 @@ This at-rule follows the forward-compatible parsing rules of CSS.
27762770
Like properties in a declaration block,
27772771
declarations of any descriptors that are not supported by the user agent
27782772
must be ignored.
2779-
@font-palette-values rules require a font-family descriptor;
2773+
''@font-palette-values'' rules require a '@font-palette-values/font-family' descriptor;
27802774
if it is missing,
2781-
the @font-palette-values rule is invalid and must be ignored entirely.
2775+
the ''@font-palette-values'' rule is invalid and must be ignored entirely.
27822776

27832777
In cases where user agents have limited platform resources,
27842778
do not implement support for color fonts,

0 commit comments

Comments
 (0)