Closed
Description
This is kind of a follow-on from the closed issue #2701 and #2937.
Would it make any sense to implement native CSS nesting something like this?
body {
background: black;
color: white;
( /* note the open parentheses to indicate everything within is nested */
main {
background: orange;
color: black;
}
p {
font: serif;
}
) /* close parentheses */
}
Or perhaps even like this (uses existing parser patterns):
body {
background: black;
color: white;
@nest { /* or @nested, or @child, etc */
main {
background: orange;
color: black;
}
p {
font: serif;
}
} /* END NEST */
}
Basically, it would require any nesting to be placed within a separate grouping container, as a way to differentiate in bulk between attributes and nested selectors. Seems to me that this would have the benefit of not using the ampersand character and thus avoiding complications with pre-processors...