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

CSS3 background-position

From: Yves Lafon <ylafon@w3.org>
Date: Wed, 6 Jan 2010 10:12:37 -0500 (EST)
To: www-style@w3.org
Message-ID: <alpine.DEB.1.10.1001061001200.21692@wnl.j3.bet>
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?

Doing

  [ center | [ left | right | <percentage> ] | [<length> ]? ] ||
  [ center | [ top | bottom | <percentage> ] |[ <length> ]? ]

would be more powerful: allowing only length as the extra offset and 
allowing percentages as the first offest would give more flexibility in 
the layout. Of course it removes the 'right 20% <blah>' and force people 
to use '80% <blah>' instead but that should be a small inconvenience.

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


[1] http://www.w3.org/TR/2009/CR-css3-background-20091217/#background-position

-- 
Baroula que barouleras, au tiéu toujou t'entourneras.

         ~~Yves
Received on Wednesday, 6 January 2010 15:12:39 GMT

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