Re: [csswg-drafts] [css-values] Define value syntax that limits <integer>, <number>, <length>, etc. to ranges (#355)

Brackets and dots notation
----------------

An ellipsis made of three dots `...` (not U+2026 `…`) could stand in for an infinity sign.

* font-size:  `<absolute-size> | <relative-size> | <length-percentage [0, ...]>`
* font-weight: `[ normal | bold | <number [1, 1000]> ] | bolder | lighter`
* font-stretch: `normal | <percentage [0%, ...]> | <font-stretch-keyword>`
* font-style: `normal | italic | oblique <angle [-90deg, 90deg]>?`

Dots notation
----------------

This could be coupled with two dots to indicate a closed range, which in turn is just a variation of the _human-readable range notation_ with `..` substituting `to` and `...` for `+`.

* font-size:  `<absolute-size> | <relative-size> | <length-percentage: 0 ...>`
* font-weight: `[ normal | bold | <number: 1 .. 1000> ] | bolder | lighter`
* font-stretch: `normal | <percentage: 0% ...> | <font-stretch-keyword>`
* font-style: `normal | italic | oblique <angle: -90deg .. 90deg>?`



-- 
GitHub Notification of comment by Crissov
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/355#issuecomment-467102835 using your GitHub account

Received on Monday, 25 February 2019 17:32:29 UTC