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

fantasai wrote:
> 
> Bert Bos wrote:
>>
>> But even the positioning relative to other edges than top and left is 
>> no longer needed since we decided to add calc() to CSS. That wasn't an 
>> easy decision, because calc() is not easy to work with (and a real 
>> challenge for a WYSIWYG editor), but its power is such that it removed 
>> the need for several other things, such as extensions to the 
>> 'background-position' property.
> 
> It wouldn't solve positioning relative to the 'start' or 'end' edge, 
> though.

Here's another proposal:

   background-position: left 10px top 10px; /* Equivalent to background-position: 10px 10px */
   background-position: right 10px bottom 10px; /* 10px in from the bottom right corner */

Then we can also have

   background-position: start before; /* top left for LTR, top right for RTL */
   background-position: end 10px after 10px; /* same as right 10px bottom 10px for LTR,
                                                        left 10px bottom 10px for RTL */

~fantasai

Received on Friday, 18 January 2008 21:43:40 UTC