这里是更少的代码:
.block {
background: blue;
.element {
background: green;
}
}
.extended-block:extend(.block all) {}
.extended-element:extend(.element all) {}
.block,
.extended-block {
background: blue;
}
.block .element,
.extended-block .element,
.block .extended-element {
background: green;
}