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
It seems like there's an optimization to be had by grouping rules from the same media queries. For example, I'm working on dark mode for a project and the minified stylesheet has six instances of @media screen and (prefers-color-scheme:dark){}. Five of those could have been removed from the output (that's 235 characters, and I'm still creating more). I can see other media queries where this should be the case as well.
Perhaps there's an edge case(s) that prevent this from being doable, but if I manually merge my six instances into one everything still works.
The text was updated successfully, but these errors were encountered:
We already merge adjacent media queries, but non-adjacent rules cannot be merged safely without changing the order of the rules and thus potentially changing the behavior.
It seems like there's an optimization to be had by grouping rules from the same media queries. For example, I'm working on dark mode for a project and the minified stylesheet has six instances of
@media screen and (prefers-color-scheme:dark){}
. Five of those could have been removed from the output (that's 235 characters, and I'm still creating more). I can see other media queries where this should be the case as well.Perhaps there's an edge case(s) that prevent this from being doable, but if I manually merge my six instances into one everything still works.
The text was updated successfully, but these errors were encountered: