Re: [css3-background] background-position relative to other corners

fantasai wrote:
> 
> Eric A. Meyer wrote:
>>
>> At 10:03 AM -0700 1/29/08, Alan Gresley wrote:
>>
>>> Giving the 'background-origin' property an extra value. This does 
>>> make sense.
>>
>>    Another possibility is to rename what's now 'background-origin' to 
>> 'background-edge' or 'background-bound' (which seems to be what it's 
>> really about) and then have a brand-new 'background-origin' that is 
>> actually used to define the origin corner.  The horizontal and 
>> vertical offset values defined in 'background-position' would then be 
>> calculated from the corner defined in 'background-origin', which would 
>> default to 'top left' or 'top-left' or whatever.
> 
> The disadvantage of this is that it doesn't fall back as nicely. When
> the offset and the corner are both specified in 'background-position',
> you lose both at the same time rather than keeping the offset, but
> offsetting against the wrong corner.
> 
> E.g.
> 
> background-position: bottom right;
> background-position: bottom 10px right 10px;
> 
> would fall back to the bottom right corner in older UAs. If you split the
> property to
> 
>   background-origin: bottom right;
>   background-position: 10px 10px;
> 
> then the fallback positions the image 10px from the top left corner 
> instead.

Oh, also we already have
   background-position: bottom right;
Adding another property that takes the same values would be a bit confusing,
I think.

~fantasai

Received on Monday, 21 April 2008 22:56:49 UTC