Re: [css-values] Relaxing <custom-ident> restrictions when unambiguous

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.

~fantasai

Received on Thursday, 6 March 2014 04:29:39 UTC