Having multiple two-class selectors for a single declaration block, is it possible to simplify the following (i.e. not having to repeat the body
tag):
body.shop, body.contact, body.about, body.faq {background-color:#fff;}
In this case we can use @each
directive:
$pages: shop, contact, about, faq;
body {
@each $page in $pages {
&.#{$page} {
background-color:#FFF;
}
}
}
If you are using sass compiled by the node, that may do.
body {
.shop, .contact, .about, .faq {
background-color:#FFFFFF;
}
}