Skip to content

Commit 8ea8d7d

Browse files
committed
[css-value-3] Define new bracketed range notation for the CSS value definition syntax. #355
1 parent 36eb02e commit 8ea8d7d

File tree

1 file changed

+52
-5
lines changed

1 file changed

+52
-5
lines changed

css-values-3/Overview.bs

Lines changed: 52 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ Module Interactions
7676

7777
Value Definition Syntax
7878

79-
The syntax described here is used to define the set of valid values
80-
for CSS properties. A property value can have one or more components.
79+
The value definition syntax described here
80+
is used to define the set of valid values for CSS properties
81+
(and the valid syntax of many other parts of CSS).
82+
A value so described can have one or more components.
8183

8284

8385
Component value types
@@ -92,6 +94,9 @@ Component value types
9294
  • 9395
    basic data types, which appear between ''<'' and ''>''
    9496
    (e.g., <>, <>, etc.).
    97+
    98+
    this type notation can annotate any range restrictions
    99+
    using the [[#numeric-ranges|bracketed range notation]] described below.
    95100

    96101
  • 97102
    types that have the same range of values as a property bearing the same name
    @@ -355,7 +360,11 @@ Property value examples
    355360

    356361
    Textual Data Types
    357362

    358-
    Identifiers,
    363+
    The textual data types include
    364+
    various keywords and identifiers
    365+
    as well as strings (<>) and URLs (<>).
    366+
    367+
    CSS identifiers,
    359368
    generically denoted by <ident>,
    360369
    consist of a sequence of characters conforming to the <> grammar. [[!CSS3SYN]]
    361370
    Identifiers cannot be quoted;
    @@ -665,14 +674,52 @@ URL Modifiers
    665674

    666675
    Numeric Data Types
    667676

    668-
    Properties may restrict numeric values to some range.
    677+
    The numeric data types include
    678+
    <>,
    679+
    <>,
    680+
    <>,
    681+
    and various dimensions
    682+
    including <>, <>, <, <>, and <>.
    683+
    684+
    Note: While genera-purpose dimensions are defined here,
    685+
    some other modules define additional data types
    686+
    (e.g. [[css-grid-1]] introduces ''fr'' units)
    687+
    whose usage is more localized.
    688+
    689+

    690+
    Range Restrictions and Range Definition Notation
    691+
    692+
    Properties can restrict numeric values to some range.
    669693
    If the value is outside the allowed range,
    670-
    unless otherwise specified,
    694+
    then unless otherwise specified,
    671695
    the declaration is invalid and must be ignored.
    696+
    Range restrictions can be annotated in the numeric type notation
    697+
    using bracketed range notation,
    698+
    [min,max]
    699+
    within the angle brackets, after the identifying keyword,
    700+
    indicating a closed range
    701+
    between (and including) min and max,
    702+
    e.g. <>.
    703+
    704+
    Note: CSS values generally do not allow open ranges;
    705+
    thus only square-bracket notation is used.
    672706

    673707
    CSS theoretically supports infinite precision and infinite ranges for all value types;
    674708
    however in reality implementations have finite capacity.
    675709
    UAs should support reasonably useful ranges and precisions.
    710+
    Range extremes that are ideally unlimited
    711+
    are indicated using ∞ or −∞ as appropriate.
    712+
    713+
    If no range is indicated,
    714+
    either by using the bracketed range notation
    715+
    or in the property description,
    716+
    then [−∞,∞] is assumed.
    717+
    718+
    Note: At the time of writing,
    719+
    720+
    thus in most CSS specifications
    721+
    any range limitations are described only in prose.
    722+
    This does not make them any less binding.
    676723
    commit comments
    Comments
     (0)