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

On Jan 27, 2008, at 12:01 AM, fantasai wrote:

>
> Alan Gresley wrote:
>> How does this type of expansion have any analogy for the bottom  
>> right corner for instance?
>>>    background-position: right 10px bottom 15px;
>>>    background-position: right      bottom     ;
>>>    background-position:       10px        15px;
>>>    background-position: right             15px;
>>>    background-position:       10px bottom     ;
>> I can see the cases where authors may want use such background  
>> positions:
>> background-position: left 0px top 0px;
>> or this background-position: left bottom;
>
> Yes, it works like that.
>> This is part of why I proposed background:position with four  
>> edges. It
>> doesn't replace background-size,  it's just an implicit way to size a
>> background image along with positioning it. It also break aways from
>> just seeing a background position relative to one corner which is  
>> much
>> similar in behavior to relative positioning (maximum of two edges)  
>> which
>> is nowhere as dynamic as absolute positioning (four edges). I can  
>> see:   background-position: 100px 100px 100px 100px; /* implicit */
>> which would equal;
>>   background-size: 100% 100%; /* explicit */
>> That leaves background position and size available to still be  
>> used together:
>> background-position: 100px 100px 100px 100px;
>> background-size: 50% 50%; /* relative to background-position */
>
> So then what does
>   background-position: 100px 100px 100px 100px;
>   background-size: 2em 50px;
> mean?

I think it would mean either that the tiles overlap (in some sort of  
order determined by the spec) or that "background-size" overrides the  
3rd and 4th values of "background-position". I don't think this is a  
good reason to throw out such a good idea, of having 4 values for  
background-position that match the syntax of margin, padding, and the  
various border and outline sub-properties.

>
> I don't think the interaction between the two properties makes a  
> lot of
> sense, and particularly since you can get the effects you want with
> calc() I'm not convinced it's a good idea to adopt this syntax for
> background-position.
>
> ~fantasai
>

Received on Sunday, 27 January 2008 17:37:45 UTC