Re: CSS3 background-position

On 01/07/2010 05:01 AM, Yves Lafon wrote:
>
>>> 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"?

There isn't anything I can do about that part, it's been required
due to parsing considerations since CSS2.

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

As Brad pointed out, center plus an offset is not allowed.

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

css3-backgrounds does not need to be modified to take into account new
values from css3-values. That's not how modules work.

~fantasai

Received on Thursday, 7 January 2010 18:49:41 UTC