W3C home > Mailing lists > Public > www-style@w3.org > January 2008

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Sun, 27 Jan 2008 00:01:49 -0800
Message-ID: <479C3A6D.4000708@inkedblade.net>
To: Alan Gresley <alan1@azzurum.com>
CC: www-style@w3.org

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 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 08:01:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:00 GMT