Skip to content

Commit 0ef2dbe

Browse files
committed
[css-values-4] Define textual and numeric data types more precisely.
1 parent 7675a36 commit 0ef2dbe

1 file changed

Lines changed: 28 additions & 2 deletions

File tree

css-values-4/Overview.bs

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,28 @@ Combining Values: Interpolation, Addition, and Accumulation</h2>
437437
<h2 id="textual-values">
438438
Textual Data Types</h2>
439439

440-
<dfn export lt="CSS identifier | CSS ident | identifier | ident">Identifiers</dfn>,
440+
Textual data types are used to represent identifiers or text.
441+
Aside from the casing of <a href="#keywords">pre-defined keywords</a>
442+
or as explicitly defined for a given property,
443+
no normalization is performed,
444+
not even Unicode normalization:
445+
the <a lt="specified value">specified</a> and <a>computed value</a> of a property
446+
are exactly the provided Unicode values after parsing
447+
(which includes character set conversion and [[css-syntax-3#escaping|escaping]]).
448+
[[!UNICODE]] [[!CSS3SYN]]
449+
450+
<dfn export lt="CSS identifier | CSS ident | identifier | ident">CSS identifiers</dfn>,
441451
generically denoted by <dfn>&lt;ident></dfn>,
442452
consist of a sequence of characters conforming to the <<ident-token>> grammar. [[!CSS3SYN]]
443453
Identifiers cannot be quoted;
444454
otherwise they would be interpreted as strings.
455+
CSS properties accept two classes of <a>identifiers</a>:
456+
[[#keywords|pre-defined keywords]]
457+
and [[#custom-idents|author-defined identifiers]].
458+
459+
Note: The <<ident>> production is not meant for property value definitions--
460+
<<custom-ident>> should be used instead.
461+
It is provided as a convenience for defining other syntactic constructs.
445462

446463
<!--
447464
██ ██ ████████ ██ ██ ██ ██ ███████ ████████ ████████ ██████
@@ -457,7 +474,7 @@ Textual Data Types</h2>
457474
Pre-defined Keywords</h3>
458475

459476
In the value definition fields,
460-
keywords with a pre-defined meaning appear literally.
477+
<dfn lt="keyword" export>keywords</dfn> with a pre-defined meaning appear literally.
461478
Keywords are <a>CSS identifiers</a>
462479
and are interpreted <a lt="ASCII case-insensitive">ASCII case-insensitively</a>
463480
(i.e., [a-z] and \[A-Z] are equivalent).
@@ -748,6 +765,15 @@ URL Modifiers</h4>
748765
<h2 id="numeric-types">
749766
Numeric Data Types</h2>
750767

768+
Numeric data types are used to represent
769+
quantities, indexes, positions, and other such values.
770+
Although many syntactic variations can exist
771+
in expressing the quantity (numeric aspect) in a given numeric value,
772+
the <a lt="specified value">specified</a> and <a>computed value</a>
773+
do not distinguish these variations:
774+
they represent the value’s abstract quantity,
775+
not its syntactic representation.
776+
751777
Properties may restrict numeric values to some range.
752778
If the value is outside the allowed range,
753779
the declaration is invalid and must be <a href="https://www.w3.org/TR/CSS21/conform.html#ignore">ignored</a>.

0 commit comments

Comments
 (0)