4 ms·
But the example with multiple selectors and & at the start is unclear due to the precedence of the @nest operator over the comma: /* @nest always */ @n
by spiralx 4y ago
But the example with multiple selectors and & at the start is unclear due to the precedence of the @nest operator over the comma:
/* @nest always */
@nest & + .baz,
&.qux {
color: red;
}
It's clearer perhaps with different nesting, but that's fragile and a pain:
/* @nest always */
@nest & + .baz,
&.qux {
color: red;
}
At least with option 1 you only end up with this issue in the uncommon case of multiple selectors and a non-leading &.
/* @nest */
& + .baz,
&.qux {
color: red;
}