- From: Simon Sapin <simon.sapin@exyr.org>
- Date: Thu, 06 Mar 2014 11:57:38 +0000
- To: fantasai <fantasai.lists@inkedblade.net>, www-style@w3.org, "L. David Baron" <dbaron@dbaron.org>
On 06/03/2014 04:29, fantasai wrote: > On 03/04/2014 03:22 PM, Simon Sapin wrote: >> Hi, >> >> CSS Values and Units currently defines: >> >> http://dev.w3.org/csswg/css-values/#custom-idents >>> Some properties accept arbitrary author-defined identifiers as a >>> component value. This generic data type is denoted by <custom-ident>, >>> and represents any valid CSS identifier that does not otherwise >>> appear as a pre-defined keyword in that property's value definition. >>> [...] >>> >>> The CSS-wide keywords are not valid <custom-ident>s. The ‘default’ >>> keyword is reserved and is also not a valid <custom-ident>s. >> >> This is more restrictive than it needs to be. > > OK, I've updated the spec: > http://dev.w3.org/csswg/css-values-3/#custom-idents > > New text: > > # Specifications using ‘<custom-ident>’ should specify clearly > # what other keywords are excluded from <custom-ident>— > # for example by saying that any pre-defined keywords > # in that property's value definition are excluded. > # As a general rule,an identifier that could be interpreted > # as a pre-defined keyword in any position or multiplication > # of the <custom-ident> component value is excluded, > # and is invalid as a <custom-ident> matching to that component value > # even in positions where its use would be technically unambiguous. > # For example, if a keyword could be misparsed when specified > # as the first item of a ‘<custom-ident>+’ list, it is invalid > # when specified in any position in that list. > > Let me know if that seems good. The paragraph before the one you quoted is: > The CSS-wide keywords are not valid <custom-ident>s. The ‘default’ > keyword is reserved and is also not a valid <custom-ident>. Do we want to exclude these even when they’re not ambiguous? For example, <custom-ident> in CSS Grid’s <line-names> is completely unambiguous thanks to the parens. <'font-family'> is currently not defined with <custom-ident>. But if it were, it would be unambiguous when in the 'font' shorthand because of the mandatory <'font-size'> that separate it from other keywords. -- Simon Sapin
Received on Thursday, 6 March 2014 11:58:13 UTC