While using bundled stylesheets can help save on page load performance, it can also slow down the browser's rendering of animations due to the excess amount of styles present. Even if these styles are not being used on the current page, the browser still has to process them.
For more information, check out:
Advantages of bundled stylesheets:
- Improved page load performance
Disadvantages of bundled stylesheets:
- Slower behavior leading to choppy scrolling, interactivity, and animations
Conclusion:
To address both issues, it is recommended for production to bundle all css into a single file to reduce http requests. However, use javascript to extract only the necessary css for the current page and dynamically update the head with it.
To simplify the process of determining which shared components are required for each page and reduce complexity, it would be helpful to declare all the components used on that specific page, such as:
<style href="global.css" rel="stylesheet"/>
<body data-shared-css-components="x,y,z">