You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that nested selectors are interfering with Lightning CSS's minification process
Minification works correctly for non-nested selectors, but it fails to combine rules when nesting is involved:
I've noticed that nested selectors are interfering with Lightning CSS's minification process
Minification works correctly for non-nested selectors, but it fails to combine rules when nesting is involved:
Non-nested (works correctly):
This correctly minifies to:
.bar.foo{color:green}
Nested (doesn't minify as expected):
Playground
This produces:
.bar .foo{color:red}.bar .foo{color:green}
Nested with nesting feature disabled:
Playground
This produces:
.bar{& .foo{color:red}}.bar{& .foo{color:green}}
Expected Behavior
The nested selectors should be minified and combined similarly to the non-nested version, resulting in:
.bar .foo{color:green}
Actual Behavior
The nested selectors are not being combined, resulting in duplicate rules that could be further optimized
The text was updated successfully, but these errors were encountered: