Re: background-position and -origin

Eric A. Meyer wrote:
> 
> At 8:02 PM +0100 8/14/08, fantasai wrote:
> 
>> Thanks for your comments. It's an interesting idea, and would certainly
>> make the property name more meaningful, but Bert and I think the
>> backwards-compatibility story of specifying the corner and the offset
>> together is better:
>>   http://lists.w3.org/Archives/Public/www-style/2008Apr/0370.html
>>
>> What do you think?
> 
>    The fallback story is better from a formal point of view, though I 
> don't know that a web designer would be of like mind.  Even if a browser 
> takes 'bottom 25px right 10%' to be 'bottom right' (which presumes a 
> really good CSS parsing implementation, and we know that's a chancy 
> thing upon which to rely), most designers aren't going to be much or any 
> happier than if it had just ignored the whole thing and defaulted to '0 0'.

Oh, a browser that doesn't understand 'bottom 25px right 10%' should
certainly ignore it entirely! But if the author /wanted/ to provide
a fallback, he could by specifying it before the ignored rule.

   background-position: bottom right;          /* fallback */
   background-position: bottom 25px right 10%; /* ignored by CSS2 UAs */

> One question: would there be room to define your proposed more flexibly,
> so that the following would be equivalent?
> 
>    background-position: bottom 10px right 25%;
>    background-position: bottom right 10px 25%;

Hmm, I do believe that would be possible. A bit messy for the spec's
syntax definition, but shouldn't be a problem aside from that. I'll
add that as a note in the spec and see what people think. :)

~fantasai

Received on Thursday, 14 August 2008 20:44:41 UTC