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

Re: [css-device-adapt] Number or percentage values for zoom values

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 1 Mar 2013 10:49:20 -0800
Message-ID: <CAAWBYDDoA2wC7kKEepkf2GNMO5iSqykNTQKAKXbhyaqaCF4JwQ@mail.gmail.com>
To: Simon Sapin <simon.sapin@exyr.org>
Cc: Rune Lillesveen <rune@opera.com>, www-style list <www-style@w3.org>
On Fri, Mar 1, 2013 at 8:29 AM, Simon Sapin <simon.sapin@exyr.org> wrote:
> Le 01/03/2013 17:08, Rune Lillesveen a écrit :
>> currently both <number> and <percentage> values are allowed for the
>> various zoom descriptors in @viewport. A long time ago, an issue was
>> raised about this ("Issue 4: Should both numbers and percentages be
>> allowed?"). According to the complaint there is no tradition in CSS for
>> having two different ways of expressing the same value.
> Well, font-size and line-height both accept percentages that do the same as
> the em unit. Obviously we can’t change these now, but *maybe* this is a not
> pattern we want to repeat with new features?

It is normally a bad idea to have two different ways of doing the same
thing.  It's confusing to authors, and it closes off easy expansion
opportunities in the future.

However, in this case it's appropriate.  The meta viewport uses
numbers, so people are familiar with that, but it's conceptually a
percentage, so that's appropriate as well.  I don't see a good reason
to believe we'll want to expand this feature in the future with a
similar functionality, so losing the easy expansion is fine.

>> Looking at various other specs I'm leaning towards keeping <percentage>
>> and drop <number> for zoom values. Opinions?
> <percentage> for zoom sounds good, but this is not a strong opinion.
> 'opacity' does uses <number> where <percentage> would also make sense, but
> again, maybe it’s an exception.

Yes, 'opacity' is an exception/mistake.  (I want to get it fixed in
Colors 4 to also accept a <percentage>.)

Received on Friday, 1 March 2013 18:50:06 UTC

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