Reputation: 3
.my-class {
&:before{
content:"";
display:block;
background:red;
h1 ????{
padding-top: 5px
}
}
}
is it possible to use & in this location to have output like
h1.my-class:before {
padding-top: 5px
}
Upvotes: 0
Views: 233
Reputation: 1919
You need to SCSS it this way::
.my-class {
&:before {
content: "";
display: block;
background: red;
@at-root h1 {
&.my-class {
&:before {
padding-top: 5px;
}
}
}
}
}
Upvotes: 1