CSS3 background-position

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 UTC