5 ms·
Style your site with "only" 291KiB of CSS (24KiB compressed)?
by mfontani 8y ago
Style your site with "only" 291KiB of CSS (24KiB compressed)?
- ssijak 8y agoUsing things like purgecss with tailwind will make your css few kb large.
- baxtr 8y agoPlease read this... > By comparison Tailwind seems really heavy (over 1.5x larger than Bootstrap!), but it turns out that this comparison isn't totally fair. https://tailwindcss.com/docs/controlling-file-size/#app https://tailwindcss.com/docs/controlling-file-size/#app
- jermaustin1 8y agoBut couldn't you also do the same to Bootstrap with PurgeCSS and still come out ahead of Tailwind?
- adamwathan 8y agoTailwind would come out ahead because there are fewer classes that contain the same declarations, so the total number of style declarations would be less.
- patates 8y agoI'm not a big fan of the bloat here too but with some scripting wizardry you can probably delete all the unused classes.
- PunchTornado 8y agobut then if you add more classes into your html then you need to add them back in css which is against the point.
- seddin 8y agoWhen you can replicate the site that she mentions and less than 50 lines of CSS.
- fouc 8y agoIt only seems large because there's lots of repetition based on the various screen sizes, colors, and states (hover, focus, etc). In production it's just a few kilobytes in size.