W3C home > Mailing lists > Public > www-style@w3.org > July 2014

Re: [css-syntax] Do not require digits after decimal point for number tokens

From: Alan Stearns <stearns@adobe.com>
Date: Wed, 30 Jul 2014 22:10:26 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>
CC: Lea Verou <lea@verou.me>, www-style list <www-style@w3.org>
Message-ID: <CFFEBA48.1E138%stearns@adobe.com>
On 7/30/14, 2:49 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

>On Wed, Jul 30, 2014 at 12:52 PM, Alan Stearns <stearns@adobe.com> wrote:
>> On 7/29/14, 12:42 PM, "Lea Verou" <lea@verou.me> wrote:
>>>On Jul 29, 2014, at 22:20, Lea Verou <lea@verou.me> wrote:
>>>
>>>> When the author is editing non integer lengths (e.g. from 2.5px to
>>>>2.9px), it usually goes like this (| denotes the caret):
>>>>
>>>> 2.5px|
>>>> 2.5|px
>>>> 2.|px
>>>> 2.9|px
>>>>
>>>> Instead of being able to observe the result of their changes, all they
>>>>see is a flash, since the 3rd step makes the value invalid, then it
>>>>jumps back to 2.9px. It sounds trivial, but it’s encountered so
>>>>frequently that it’s incredibly annoying.
>>>
>>>
>>>Actually, I just realized my example doesn't demonstrate what I meant.
>>>The numbers should have been 2px to 2.1px:
>>>
>>>2px|
>>>2|px
>>>2.|px
>>>2.1|px
>>>
>>
>> It seems to me that this should be a fix in the tools that allow
>> live-editing of values. I think it would be bad to allow 2.px as a value
>> in a stylesheet. Just 2. by itself might be OK, but that’s not going far
>> enough to solve your use case.
>
>Why would 2.px be bad?

Looks like an error to me, but if that’s just me I’m fine with this. I
suppose we’d be making work for libraries that parse CSS strings.

It just seems to me like an affordance that should be implemented at the
tool level rather than extending the grammar.

Thanks,

Alan

Received on Wednesday, 30 July 2014 22:10:57 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:23 UTC