- From: Brad Kemper <brkemper@comcast.net>
- Date: Tue, 12 Feb 2008 22:39:53 -0800
- To: Alan Gresley <alan1@azzurum.com>
- Cc: www-style CSS <www-style@w3.org>
Received on Wednesday, 13 February 2008 06:41:22 UTC
On Feb 12, 2008, at 10:27 PM, Brad Kemper wrote: >> @constant ???( nav, #sidenav, #topnav ) { >> >> ul {list-style: none;} >> li (float: left;} /* specificity 1.0.1 */ >> a {display: block;} >> a:link, a:visited {color: black; background-color: yellow; } >> a:hover {background-color: black; color: yellow; } >> a:active { background-color:black; color:red; } >> >> } > > I'm not sure what you are getting at here. If it is defining the > descendants, that can be done more simply, without the extra > brackets. I would do it like this: > > /* create constant called MYNAVS and assign selectors to it: */ > @constant MYNAVS( nav, #sidenav, #topnav ) > > /* now use MYNAVS as placeholders of those three selectors */ > MYNAVS ul {list-style: none;} > MYNAVS li (float: left;} > MYNAVS a {display: block;} > MYNAVS a:link, MYNAVS a:visited {color: black; background-color: > yellow; } > MYNAVS a:hover {background-color: black; color: yellow; } > MYNAVS a:active { background-color:black; color:red; } Although, yours is shorter. It just isn't assigning anything to a constant or variable anymore, so I wouldn't call it that. Could be useful though; so I didn't mean to put it down.
Received on Wednesday, 13 February 2008 06:41:22 UTC