-
Notifications
You must be signed in to change notification settings - Fork 244
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
The following code
@import url('./layout/tokens.css') layer(theme);
@import url('./ornamental/tokens.css') layer(theme);
@import url('./layout/defaults.css') layer(defaults);
Currently bundles/minifies into
@layer theme {
// layout/tokens.css content
}
@layer theme {
// ornamental/tokens.css content
}
@layer defaults {
// ornamental/tokens.css content
}
While it could minify to
@layer theme {
// layout/tokens.css content
// ornamental/tokens.css content
}
@layer defaults {
// ornamental/tokens.css content
}
As a project grows into a large number of files this adds up in the total bundle.
As a further optimization it should even be possible to hoist the contents of any layer to the first occurrence of that layer, and always only output a single @layer for a unique name in any one bundle. That's the way the cascade works anyway.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers