Re: [css21][css3-values] <positive-integer>

Le 09/05/2012 01:07, Kang-Hao (Kenny) Lu a écrit :
> (12/05/09 3:56), Simon Sapin wrote:
>> >  Whether or not it appears in the "Value:" line for properties, I think
>> >  that "positive" and such constraints should be defined in terms of
>> >  numerical comparison, not in character-based grammar.
> Why?<integer>  is already a syntactical constraint (i.e. 'z-index: 1.0'
> isn't valid, albeit 1.0 == 1). The questionable parts are
>
> 1. is '-0' non-negative?
>
> [snip other issues with numerical comparison]


Ok, I understand the issues. Numerical comparison is especially bad for 
non-zero values that are rounded to zero because of machine precision.

So if the constraint is syntactical, css3-syntax is the place to have 
it. The "new" state-machine-based css3-syntax already has an "integer" 
flag on numerical tokens. Adding "positive" and "zero" flags should be 
enough to define <positive-integer> and other variants.

Can V&U3 depend on Syntax3, or will the later not be ready in time?

-- 
Simon Sapin

Received on Wednesday, 9 May 2012 05:23:23 UTC