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

Re: positioned elements: center

From: Brad Kemper <brkemper@comcast.net>
Date: Sat, 5 Jan 2008 19:37:58 -0800
Message-Id: <570B0FF8-1A9B-4A2D-9012-9BC06F2A524C@comcast.net>
Cc: CSS Style <www-style@w3.org>
To: John Oyler <johnoyler.css@gmail.com>

On Jan 5, 2008, at 7:24 PM, Brad Kemper wrote:

>> But I don't like center-$ where $ is the direction. Is that  
>> already part of other property names? If so, I guess you'd stick  
>> with convention. But if not, even though I dislike it, I don't  
>> have any good alternatives.
>
> I got that from overflow-x and overflow-y, so there is precedent.  
> I'm not glued to the names, but it did seem that you would need one  
> for each direction.
>
> For overflow, we have this, so I imagined it could work in a  
> similar way syntacticly:
>
> ‘Overflow’ is a shorthand. If it has one keyword, it sets both  
> ‘overflow-x’ and ‘overflow-y’ to that keyword; if it has two, it  
> sets ‘overflow-x’ to the first and ‘overflow-y’ to the second.
>
> Thus, "center:50%" would center an item horizontally and vertically  
> at the same time.
>

By the way that is CSS3. Oh, and the x/y thing is also used there in  
background-repeat values:

repeat-x
The image is repeated horizontally only.
repeat-y
The image is repeated vertically only.
Received on Sunday, 6 January 2008 03:38:11 GMT

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