sass - Redefine an SCSS nesting selector depending on the body class inside of the nesting block -
this question has answer here:
- make backward nesting in scss? 2 answers
i have scss ruleset looks this:
.thing { div { // rules } }
sometimes want restyle .thing div
element depending on class being added body
in standard css have done this:
.thing div { // rules } .deactivated .thing div { // override when it's in body.deactivated }
is there way break out of nest indicate top-level enclosing selector in scss?
no. if want nest, this:
.thing { div { // rules } } .deactiviated { .thing { div { // other rules } } }
Comments
Post a Comment