Open utterances-bot opened 2 years ago
Now, the resources will then only be loaded if the media condition is true.
I thought that all stylesheets are still loaded, but the ones whose media doesn’t match are just loaded with a lower priority. It might be worth testing this to confirm that it’s true.
Conditionally loading CSS or any resource using media queries — Amit Merchant — A blog on PHP, JavaScript, and more
Unless you’re using something like Tailwind CSS, the stylesheet files are one of the most expensive resources that your application is loading.
https://www.amitmerchant.com/conditionally-loading-css-or-any-resource-using-media-queries/