Content-Length: 467756 | pFad | http://github.com/w3c/csswg-drafts/commit/18747eb3d6cf9276709185ce0565e33db281846c

3C [css-values-4][css-syntax-3] Define <foo()> and <@foo>, plus some lig… · w3c/csswg-drafts@18747eb · GitHub
Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 18747eb

Browse files
committedOct 10, 2022
[css-values-4][css-syntax-3] Define <foo()> and <@foo>, plus some light editorial rewriting. #5728
1 parent e21c674 commit 18747eb

File tree

2 files changed

+46
-39
lines changed

2 files changed

+46
-39
lines changed
 

‎css-syntax-3/Overview.bs

+9-7
Original file line numberDiff line numberDiff line change
@@ -3263,15 +3263,17 @@ The <<urange>> type</h3>
32633263
<h2 id='rule-defs'>
32643264
Defining Grammars for Rules and Other Values</h2>
32653265

3266-
The <a href="https://www.w3.org/TR/css3-values/">Values</a> spec defines how to specify a grammar for properties.
3267-
This section does the same, but for rules.
3266+
[[css-values-4#value-defs]] defines how to specify a grammar for properties.
3267+
This section extends those definitions
3268+
to also allow specifying a grammar for rules.
32683269

3269-
Just like in property grammars,
3270-
the notation <code>&lt;foo></code> refers to the "foo" grammar term,
3271-
assumed to be defined elsewhere.
3272-
Substituting the <code>&lt;foo></code> for its definition results in a semantically identical grammar.
3270+
Non-terminals representing the entire grammar of an [=at-rule=]
3271+
are written as an @ character followed by the at-rule's name,
3272+
between <css>&lt;</css> and <css>></css>,
3273+
e.g. <<@media>> to represent the ''@media'' rule.
32733274

3274-
For numeric data types, this type notation can annotate any range restrictions using the bracketed range notation described in the <a href="https://www.w3.org/TR/css3-values/#numeric-ranges">Values</a> spec.
3275+
The [[css-values-4#numeric-ranges|bracketed range notation]] can be used on
3276+
any of the numeric token non-terminals.
32753277

32763278
Several types of tokens are written literally, without quotes:
32773279

‎css-values-4/Overview.bs

+37-32
Original file line numberDiff line numberDiff line change
@@ -88,38 +88,43 @@ Component Value Types</h3>
8888

8989
Component value types are designated in several ways:
9090

91-
<ol>
92-
<li>
93-
<a href="#keywords">keyword</a> values (such as <css>auto</css>, ''disc'', etc.),
94-
which appear literally, without quotes (e.g. <code>auto</code>)
95-
96-
<li>
97-
basic data types, which appear between <css>&lt;</css> and <css>></css>
98-
(e.g., <<length>>, <<percentage>>, etc.).
99-
For <a>numeric data types</a>,
100-
this type notation can annotate any range restrictions
101-
using the [[#numeric-ranges|bracketed range notation]] described below.
102-
103-
<li>
104-
types that have the same range of values as a property bearing the same name
105-
(e.g., <<'border-width'>>, <<'background-attachment'>>, etc.).
106-
In this case, the type name is the property name (complete with quotes) between the brackets.
107-
Such a type does <em>not</em> include <a href="#common-keywords">CSS-wide keywords</a> such as ''inherit'',
108-
and also does not include any top-level <a href="#mult-comma">comma-separated-list multiplier</a>
109-
(i.e. if a property named <css>pairing</css> is defined as <css>[ <<custom-ident>> <<integer>>? ]#</css>,
110-
then <css>&lt;\'pairing'></css> is equivalent to <css>[ <<custom-ident>> <<integer>>? ]</css>,
111-
not <css>[ <<custom-ident>> <<integer>>? ]#</css>).
112-
113-
<li>
114-
non-terminals that do not share the same name as a property.
115-
In this case, the non-terminal name appears between <css>&lt;</css> and <css>></css>,
116-
as in <<spacing-limit>>.
117-
Notice the distinction between <<border-width>> and <<'border-width'>>:
118-
the latter is defined as the value of the 'border-width' property,
119-
the former requires an explicit expansion elsewhere.
120-
The definition of a non-terminal is typically located near its first appearance in the specification.
121-
</ol>
122-
91+
1. <a href="#keywords">Keyword</a> values (such as <css>auto</css>, ''disc'', etc.),
92+
which appear literally, without quotes (e.g. <code>auto</code>).
93+
94+
2. Basic data types,
95+
which appear between <css>&lt;</css> and <css>></css>
96+
(e.g., <<length>>, <<percentage>>, etc.).
97+
For <a>numeric data types</a>,
98+
this type notation can annotate any range restrictions
99+
using the [[#numeric-ranges|bracketed range notation]] described below.
100+
101+
3. Property value ranges,
102+
which represent the same pattern of values as a property bearing the same name.
103+
These are written as the property name,
104+
surrounded by single quotes,
105+
between <css>&lt;</css> and <css>></css>,
106+
e.g., <<'border-width'>>, <<'background-attachment'>>, etc.
107+
108+
These types <em>do not</em> include <a href="#common-keywords">CSS-wide keywords</a> such as ''inherit'',
109+
and also <em>do not</em> include any top-level <a href="#mult-comma">comma-separated-list multiplier</a>
110+
(i.e. if a property named <css>pairing</css> is defined as <css>[ <<custom-ident>> <<integer>>? ]#</css>,
111+
then <css>&lt;\'pairing'></css> is equivalent to <css>[ <<custom-ident>> <<integer>>? ]</css>,
112+
not <css>[ <<custom-ident>> <<integer>>? ]#</css>).
113+
114+
4. Functional notations and their arguments.
115+
These are written as the function's name,
116+
followed by an empty parentheses pair,
117+
between <css>&lt;</css> and <css>></css>,
118+
e.g. <<calc()>>.
119+
120+
5. Other non-terminals.
121+
These are written as the name of the non-terminal
122+
between <css>&lt;</css> and <css>></css>,
123+
as in <<spacing-limit>>.
124+
Notice the distinction between <<border-width>> and <<'border-width'>>:
125+
the latter represents the grammar of the 'border-width' property,
126+
the former requires an explicit expansion elsewhere.
127+
The definition of a non-terminal is typically located near its first appearance in the specification.
123128

124129
Some property value definitions also include the slash (/),
125130
the comma (,),

0 commit comments

Comments
 (0)
Failed to load comments.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/w3c/csswg-drafts/commit/18747eb3d6cf9276709185ce0565e33db281846c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy