W3C home > Mailing lists > Public > www-style@w3.org > January 2010

Re: CSS3 background-position

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 06 Jan 2010 17:33:59 -0800
Message-ID: <4B453A07.9090209@inkedblade.net>
To: Yves Lafon <ylafon@w3.org>
CC: www-style@w3.org
On 01/06/2010 07:12 AM, Yves Lafon wrote:
> Hi,
> In [1]
> The two values notation is inherited from CSS21, so not so much we can
> do with it, however, the 3 or 4 values notation is adding extra
> complexity for not much.
>
> [ center | [ left | right ] [ <percentage> | <length> ]? ] ||
> [ center | [ top | bottom ] [ <percentage> | <length> ]? ]
>
> left 20% top 20% is exactly like 20% 20%, so nothing really useful there.
> right 20% top 20% is like 80% 20%, that's adding complexity for nothing.
>
> right 10px top 10px, here we have something useful, but quite limited by
> the fact that keywords are imposed as first values. It is also
> impossible to do 33% -10px top 20px, why?

Because that case is solved by calc(). (Technically right and
bottom offsets can also be solved by calc(), but it is friendlier
to math-averse people to allow the use of keywords.)

See css3-values for the definition of calc().
   http://www.w3.org/TR/css3-values/
   http://dev.w3.org/csswg/css3-values/

> Also forcing four values in that case would be easier, the three values
> notation doesn't seem more human friendly :)

I'm not convinced it's better to ignore three-value notations, and
I don't think this is important enough to change at this point.
CSS3 Backgrounds and Borders is a Candidate Recommendation.

~fantasai
Received on Thursday, 7 January 2010 01:34:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:23 GMT