-
Notifications
You must be signed in to change notification settings - Fork 187
Open
Labels
Description
Describe your motivation
@StyleSheet
currently just adds a link tag to the document head, but does no further optimization on the CSS. When building large applications that rely on a lot of custom styling, or include a custom base theme, this can result in several issues:
- The CSS that needs to be loaded by the browser is not optimized for size
- When splitting up stylesheets into multiple files for better organization and importing them from a main stylesheet with
@import
, this results in a "waterfall" of smaller requests which results in the app taking longer to render
Since @StyleSheet
is intended to become the default solution for loading styles in v25 we should look in to improving this.
Describe the solution you'd like
The CSS loaded through @StyleSheet
should be optimized for production:
- The CSS should be minified to reduce the amount of data transferred to the browser
- The CSS should be inlined so that nested imports do not result in separate requests to the server
In dev mode such an optimization is probably not necessary.
knoobie
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
🪵Product backlog
Status
Maybe