W3C home > Mailing lists > Public > www-style@w3.org > March 2012

Re: [css3-mediaqueries] ratio

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 26 Mar 2012 10:35:15 -0700
Message-ID: <CAAWBYDA-bQP5zJ5W9K9RtUwkPKoM+BkaXzTHDt_8A6VGQ0fU8Q@mail.gmail.com>
To: Yves Lafon <ylafon@w3.org>
Cc: www-style list <www-style@w3.org>, Florian Rivoal <florianr@opera.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:53 GMT