Re: [css3-values] Interchangeable numbers and percentages

On Wed, 19 Oct 2011 16:29:44 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 10/19/11 10:14 AM, Boris Zbarsky wrote:
>> On 10/19/11 5:54 AM, Rudolph Gottesheim 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%
>>
>> width: 100
>
> Or more to the point, "width: 1.0".

It would just be confusing, numbers and percentages aren't really  
interchangeable in practice. If someone says "the number of people living  
in Norway is about 4700000, showing a yearly growth of 0.3%", that  
probably means there are now about 14000 more people than last year, not  
3/1000 person...

But there's also a backwards compatibility issue - in the 'line-height'  
property percentages and numbers are not equivalent.

-- 
Øyvind Stenhaug
Core Norway, Opera Software ASA

Received on Wednesday, 19 October 2011 15:11:46 UTC