Some types can accept numeric values within a certain range. For example, the column-count property can accept an integer value between positive 1 and infinity, inclusive. The corresponding syntax looks like this:
example =
<integer [1,∞]>
Any value outside this specified range causes the whole declaration to be invalid, therefore the browser will ignore it.
The bracketed range notation [min, max] indicates an inclusive range between a min and max value. This notation is used in numeric type notations and can include units, e.g., <angle [0,180deg]>. Positive and negative Infinity (-∞ and ∞) must not have units specified. Types specified in units can have zero values specified with or without units, for example <time [0s,10s]> or <time [0,10s]>.
Here are some more examples:
-
<integer [-∞,∞]>: Any integer from negative infinity to positive infinity. -
<integer [0,∞]>: Any integer from 0 to positive infinity is valid. Negative integers are invalid. -
<time [0s,10s]> or <time [0,10s]>: Any duration from 0 to 10 seconds is valid. -
<integer [-∞,-1]> | <integer [1,∞]>: Any integer except zero is valid.