Re: [css3-background] background-position

>> Can 'background-position' become a shorthand? Each value could be 
>> specified by a single property: 'background-position-x' and 
>> 'background-position-y'.
> 
> Why?

In cases you only need to change one. See:

  <http://www.nundroo.com/nav_matrix/welcome2.html>
  <http://www.nundroo.com/nav_matrix/style2.css>

Simple example:

   /* ... */
   ul#nav a{
    background:url(/images/navigation.png);
   }
   /* ... */
   ul#nav li#media a:link{
    background-position:0 -240px;
   }
   ul#nav li#media a:visited{
    background-position:-120px -240px;
   }
   ul#nav li#media a:link:hover{
    background-position:-240px -240px;
   }
   ul#nav li#media a:visited:hover{
    background-position:-360px -240px;
   }
   /* ... */

This list goes on with similar selectors, but slightly different:

   ul#nav li#news a:link{
    background-position:0 -120px;
   }

Only changing one of the two values would be very helpful and make it
the code easier to edit.


-- 
  Anne van Kesteren
  <http://annevankesteren.nl/>

Received on Saturday, 28 August 2004 17:39:28 UTC