W3C home > Mailing lists > Public > www-style@w3.org > April 2007

Re: [CSS2.1] [CSS3 Background] [CSS3 Page] background-position poorly defined

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 10 Apr 2007 16:00:30 -0400
Message-ID: <461BECDE.9010104@inkedblade.net>
To: www-style@w3.org

fantasai wrote:
> 
> Background-position is defined by example, not by rule:

I propose replacing the definition of background-position from
"If a background image has been specified" to "Negative values
are allowed" with the following (and making corresponding changes
to the CSS3 Background and CSS3 Paged Media specs):

   If a background image has been specified, this property specifies
   its initial position. If only one value is specified, the second
   value is assumed to be 'center'. If at least one value is not a
   keyword, then the first value represents the horizontal position
   and the second represents the vertical position. Negative
   <percentage> and <length> values are allowed.

   <percentage>
     A percentage X aligns the point X% across (for horizontal) or
     down (for vertical) the image with the point X% across (for
     horizontal) or down (for vertical) the element's padding box.
     For example, a value pair of '0% 0%' ... padding box.
   <length>
     A length L aligns the top left corner of the image a distance
     L to the right of (for horizontal) or below (for vertical) the
     top left corner of the element's padding box. For example, a
     value pair of '2cm 1cm' ... padding box.
   top
     Equivalent to '0%' for the vertical position.
   right
     Equivalent to '100%' for the horizontal position.
   bottom
     Equivalent to '100%' for the vertical position.
   left
     Equivalent to '0%' for the horizontal position.
   center
     Equivalent to '50%' for the horizontal position if it is not
     otherwise given, or '50%' for the vertical position if it is.

~fantasai
Received on Tuesday, 10 April 2007 20:00:42 GMT

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