如何修改父选择器链的根元素?(使用sass 3.3.x)像......
=prepend($prefix)
@at-root .#{$prefix}#{&} // note there is no dot (.) separating it
@content
.foo
.bar
+prepend(baz)
background: red
Run Code Online (Sandbox Code Playgroud)
并返回
.baz.foo .bar {
background: red;
}
Run Code Online (Sandbox Code Playgroud)
甚至更好......一种明确的方法来定位根元素(甚至是第n个元素)?
sass ×1