2 ms·
I haven't kept up with CSS practices for a loooong time. How do I use a css framework on my site for a few pages without causing the user to download hundreds o
by scrollaway 10y ago
I haven't kept up with CSS practices for a loooong time. How do I use a css framework on my site for a few pages without causing the user to download hundreds of kilobytes of unused rules?
I imagine there are linters which only compile the interesting bits; do they support jinja/django templates?
- TheDrizzle43 10y agoMinification + gzip is probably enough depending on your needs. Bootstrap, which is a fairly large css framework, is 23kb from the CDN link on their site.
- dragonshed 10y agoModern CSS frameworks try to be modular, aided by some form of css preprocessor. As a result, you can typically import only the parts your site uses. Also, as the sibling comment points out, minification + gzip will take that even further.
- allendoerfer 10y agoTree shaking with UnCSS: https://github.com/giakki/uncss https://github.com/giakki/uncss