W3C home > Mailing lists > Public > www-style@w3.org > October 2011

Re: [css3-values] Interchangeable numbers and percentages

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 19 Oct 2011 12:07:59 -0700
Message-ID: <CAAWBYDCOmGfZbhQMgfnBwN9yOHpz-6x-Oa7kO-+HESG67-3rkA@mail.gmail.com>
To: Rudolph Gottesheim <r.gottesheim@loot.at>
Cc: www-style@w3.org
On Wed, Oct 19, 2011 at 2:54 AM, Rudolph Gottesheim
<r.gottesheim@loot.at> wrote:
> Why aren't numbers and percentages completely interchangeable? The % sign is
> just a constant with the value of 1/100 after all. So what 30% really means
> is the following equasion: 30 x 0.01 = 0.3. I think we should be able to use
> numbers whereever we can use percentages and vice versa. For example:
> hsl(90, .3, .9)
> opacity: 80%

As Oyvind points out, there are already properties that accept both
numbers and percentages and give different meanings to the two, so
this can't be done generally.

There are some places that I wouldn't mind changing to accept both,
such as ,'opacity', but I don't think it's a very big deal.
(Actually, I'm of the opinion that 'opacity' should never have been a
number - it feels more natural to have it be a percentage.  That can't
be changed now, of course.)

Received on Wednesday, 19 October 2011 19:08:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:06 UTC