is there any way to group css styles based on their ids?
Posted
by Brian
on Stack Overflow
See other posts from Stack Overflow
or by Brian
Published on 2010-06-01T03:14:20Z
Indexed on
2010/06/01
3:23 UTC
Read the original article
Hit count: 332
css
|css-selectors
If I have a chunk of css styles that are applied within a certain page element, I would like to group them rather than identify the containing page element for each style. For example, I would like to turn:
#bodywrap #leftcolumn p {...}
#bodywrap #leftcolumn div {...}
#bodywrap #leftcolumn .highlight {...}
into something like:
#bodywrap #leftcolumn [
p {...}
div {...}
.highlight {...}
]
where everything contained in the brackets respects the containing declarations. Is this possible with css, and what would be the syntax?
© Stack Overflow or respective owner