Answer the question
In order to leave comments, you need to log in
How are exceptions written in SASS/SCSS?
Didn't find the answer in the documentation.
Is there any special character or something like nesting to write a property for an element that is not nested in the parent?
Something along the lines of:
& > div > .form-item > label, (magic_symbol) .not_child_element{
…
}
Answer the question
In order to leave comments, you need to log in
Nesting is designed to describe child elements depending on the parent. If you need to reuse part of a style, use placeholders and @extend :
%shared{
...
}
.parent {
& > div > .form-item > label {
@extend %shared;
}
}
.not_child_element {
@extend %shared;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question