-
Notifications
You must be signed in to change notification settings - Fork 18
NestedSelectors
Anthony Short edited this page Aug 15, 2010
·
2 revisions
This extension lets you nest selectors within each other.
body
{
color:#333;
p {
color:#555;
}
header {
padding:20px;
}
}Will return:
body { color:#333; }
body p { color:#555; }
body header { padding:20px; }There might be times when you need to reference the parent selector to do some more complex nesting:
body
{
color:#333;
& > header { padding:20px; }
}Will return
body {color:#333;}
body > header { padding:20px; }The & returns the current parent selector. This means you have access to more complex CSS selectors and you can create a single rule will all it’s sub-rules in a single selector.
Note: This extension will automatically remove all comments.
This extension has no settings.
This extension has no hooks.