Fellow Stranger Fellow Stranger - 4 years ago 140
Sass (Sass) Question

Multiple two-class selectors in Sass

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;}

Answer Source

try this:

body{
   &.shop, &.contact, &.about, &.faq {
        background-color:#fff;
    }
}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download