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

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

From: Alan Gresley <alan1@azzurum.com>
Date: Tue, 29 Jan 2008 01:20:41 -0700
To: Brad Kemper <brkemper@comcast.net>
cc: www-style@w3.org, fantasai <fantasai.lists@inkedblade.net>
Message-ID: <20080129012041.34b83c2f3c9bef00757a2c62c0fb7450.da8d13a56f.wbe@email.secureserver.net>

Brad Kemper wrote:

> On Jan 28, 2008, at 11:15 AM, fantasai wrote:
> 
> >
> > Brad Kemper wrote:
> >> 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.
> >
> >
> > It doesn't match.
> >
> >   margin: top-and-bottom left-and-right;
> > vs.
> >   background-position: top left;
> >
> > ~fantasai
> >
> 
> Oops. You're right. My bad.

The big problem is it's one system that does not quite relate to another system.

For margins, padding, border-width, and outline you have this:

property: value; /* top, right, bottom & left */
property: value value; /* top - bottom (y-axis) & left - right (x-axis) */
property: value value value; /* top, right - left (y-axis) & bottom*/
property: value value value value; /* top, right, bottom & left */

For background-position 

background-position: 0; /* left (x-axis) & auto (y-axis) */
background-position: 0 0; /* left (x-axis) & top (y-axis) */

My proposal allowing four values (I would not suggest three) would mimic those for the margins, padding, border-width and outline. In one way it simplifies things for authors by matching the same edge for background-position with those for margins, padding, border-width and outline. On the other hand it can (will) cause total confusion. Maybe what I seeking is a property:

background-position-coord: 0 0 0 0;

I have prepared a somewhat detailed reply to Fantasai's message, more coming.


Alan

http://css-class.com/
Received on Tuesday, 29 January 2008 08:21:01 GMT

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