Re: [css3-mediaqueries] ratio

On Mar 26, 2012 9:11 AM, "Yves Lafon" <ylafon@w3.org> wrote:
>
> On Fri, 23 Mar 2012, Florian Rivoal wrote:
>
> (Thanks Bert for bouncing me this email as I'm not on www-style).
>
>
>> On Tue, 25 Oct 2011 11:56:40 +0200, Yves Lafon <ylafon@w3.org> wrote:
>>
>>> Hi,
>>> I was just wondering what was the rationale for allowing spaces between
<num> and '/' and between '/' and <num> in [1]. It might be better to have
no space, as '/' is used elsewhere either as an operator, or as a 'state
change' where it can happen between two numbers as well (and mandating one
space would help disambiguating them).
>>>
>>> [1] http://www.w3.org/TR/2010/CR-css3-mediaqueries-20100727/#values
>>
>>
>> We saw no need to forbid spaces when this was designed. In other places
>> where we have slashes, we allow spaces too. Since no ambiguity arises
>> from the way <ratio> is used, and since we have multiple inter-operable
>> implementations, it does not make much sense to change it now.
>
>
> Well, look at the definition of <resolution>:
> <<
> The <resolution> value is a positive <number> immediately followed by a
unit identifier ('dpi' of 'dpcm').
>>>
>>>
> Why not allowing spaces between '42' and 'dpi'?
> It is easy to discriminate between a number, a percentage, a dimension
etc... why suddenly make a special case for ratio?

Dimensions must have no space, or else they'll parse as a number and
keyword.

There isn't a similar parsing problem with a slash-separated ratio.

~TJ

Received on Monday, 26 March 2012 17:35:47 UTC