- From: Anne van Kesteren <fora@annevankesteren.nl>
- Date: Sat, 28 Aug 2004 19:39:07 +0200
- To: Ian Hickson <ian@hixie.ch>
- CC: W3C CSS List <www-style@w3.org>
>> 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