Re: CSS3 background-position

On Wed, 6 Jan 2010, fantasai wrote:

> 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.)

Hum, friendlier? When "left 20%" is allowed and not "20% left"?
And when you need to read the spec to figure out in which direction the 
offset in "center 10px top 10px" is taken into account.
Friendliness is clearly in the eye of the beholder :)

> 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.

If css3-values has to come into the css3-background document at some 
point, which is implied by your message, then you will have to modify this 
spec anyway. So I don't see the point about keeping things frozen now.

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

         ~~Yves

Received on Thursday, 7 January 2010 13:01:54 UTC