Re: [css-values] Summary of calc() options regarding whitespace

On Wed, 14 May 2014 14:05:49 +0200, Tab Atkins Jr. <jackalmage@gmail.com>  
wrote:

>> Hmm. I envisioned it would parse as DIMENSION(1, em) DIMENSION(-1, px).  
>> That
>> is, emit the current token when seeing the dash and reconsume the dash.
>
> Yeah, that's possible too.  I don't have a strong opinion either way.

OK.

>> Also, do this when seeing a dash, not only when seeing a dash followed  
>> by a
>> digit.
>> We can still support vendor-specific units by allowing dashes in the  
>> unit
>> when the first character is a dash. Or maybe even say that when seeing a
>> dash followed by a number, you consume characters while it matches one  
>> of
>> the vendor-specific units supported by the UA.
>
> I don't like this, because it limits what we can do in the future with
> units seemingly unnecessarily.  It doesn't gain us anything in terms
> of calc(), as "calc(1em-auto)" would parse into DIMENSION(1, em)
> IDENT(-auto), which is a legitimate ident that we can't automatically
> treat as subtraction.
>
> I think there may be legit uses for dashes in units in the future,
> particularly if we ever do user-defined units.  I don't think there's
> any legit use of numbers in the dash unit, to be honest, so I'm fine
> with the "no digit following a dash" rule.

OK, fair enough.

-- 
Simon Pieters
Opera Software

Received on Wednesday, 14 May 2014 12:12:09 UTC