-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how you're supposed to use minimalcss #93
Comments
Bonus points if we can have some |
Do not forget <noscript>
<link rel="stylesheet" href="bloatedframework.css">
</noscript> |
Yep, I think that's part of the |
One of my examples https://github.com/stereobooster/react-snap/blob/master/doc/emotion-site-optimization.md We can use any big boostrap page for demo, for example https://blackrockdigital.github.io/startbootstrap-sb-admin/ or https://startbootstrap.com/template-categories/all/ |
Generally the idea is that you replace your bloated external style sheets with one block of minimal CSS. That can either be injected as a new external .css or inlined. But it's generally a good idea to do something like this:
Before:
After:
The reason why it's a good idea to still lazy load in that
bloatedframework.css
is becauseminimalcss
can only figure out the minimal CSS on first page load (including XHR) before the user starts interacting and using the pointer to cause the DOM to change.All of that needs to be explained! Ideally quite early in the README to grab peoples attention.
Also, it should probably link to loadCSS which has a good polyfill solution to lazy loading CSS. The code example above doesn't work in all browsers.
The text was updated successfully, but these errors were encountered: