189 points · by zoria · 9y ago · 95 comments
I get that they wouldn't want to advertise their competitors, but the comparison matrix on the page makes mini.css seem tiny, where as a google search shows it's the biggest popular framework like this.
Mini.css is 7KB gzipped, Milligram[0] (the first google result I see for "minimalist css framework", mini.css is second) is 2KB gzipped. Pure.css[1] (the third result) is 3.8KB gzipped.
[0] - https://milligram.github.io/ [1] - https://purecss.io/
BTW I cannot seem to see the people behind it, the "About" only says "This website was made by people. In the interests of inclusivity, we're aiming to get some robots to contribute soon."
E.g. in Bootstrap 3 if you only want typography, it's 9kb min/2.8kb gz, for typography+forms+buttons it's 27kb min/5.kb gz, for all 'common CSS' (incl grid + responsive utilities) it's 46kb min/8.8kb gz.
The comparison size of 20kb gz is only if you pulled in every additional component available.
I use CSS frameworks (mostly Bootstrap) because I suck at design. I need a hand up, and a good framework provides it. Customization is necessary, but not all that's necessary.
> For review: Bloatware and the 80/20 myth. No matter how much it bothers you neat freaks, the market always votes for bloatware.
See also [2].
Basically, one peron's bloat is another person's necessary features.
Hell, I should have posted this on the Electron rant thread the other day.
[1]: https://www.joelonsoftware.com/2002/04/07/20020407/
[2]: https://www.joelonsoftware.com/articles/fog0000000020.html
Replacing Excel for the general population is a moon-shot project; replacing it for a well selected set of use cases hard but, as history showed, possible.
And that is why I like modules.
Just be careful that you don't remove too many of them in your efforts to eliminate bloat. For example, last time I checked, the Qt toolkit implements accessibility (e.g. for blind users) in a plugin. How many Qt-based applications are completely, utterly inaccessible to some users just because they didn't ship that plugin? Again, one person's bloat is another persons' necessary feature. Yes, I made a typo the first time; I noticed it too late.
Only in our wet dreams exists a competitive edge where you copy a website 1:1 but use vanilla JS over their jQuery so things load a tiny bit faster and their users flock over to your website, chanting your name.
https://blog.gigaspaces.com/amazon-found-every-100ms-of-late...
http://glinden.blogspot.com.au/2006/11/marissa-mayer-at-web-...
I'm sure I read essentially the same from ebay as well at some point. It's worse than being a competitive advantage : extra milliseconds seem to matter a lot for the size of the market in the first place.
If you are someone who cares about speed and simplicity and generally doing things right, I don't see how this fact relevant to the current discussion. Sure, frameworks like mini won't be as popular as bootstrap. But there are plenty of people, myself included, who'd rather use them.
Your users simply won't notice the difference. If you for whatever reason need to include a picture on your page it's going to be bigger than the ultra lightweight bootstrap page.
Otherwise for all my needs it's pretty much perfect.
[0]: https://skeleton-framework.github.io
[1]: https://github.com/skeleton-framework/skeleton-framework/blo...
Give that a try. I used that and broke it into modules for a website redesign I'm working on. It's going quite well. I love using skeleton as the starting point for projects rather than picking some css framework to build on top of.
Also available for react-native: https://github.com/tachyons-css/react-native-style-tachyons
I could write a long explanation on why I think tachyons is the final destination of CSS-frameworks, but I save myself the time. Just try it.
I don't believe there's a simpler or more maintainable (read: "better") way of handling CSS.
I use it for fresh web, electron/desktop and react-native projects since about two years, and I don't think I'll ever have to use something else again.
Also on top of that you'll probably include bunch of 3rd party javascript that wastes tons of user traffic, such as ads, analytics, etc.
I'm being half sarcastic half realistic. When was the last time you cared about 2KB reduction in your CSS files? If you did, you're probably focusing on the wrong things. The only people who should be thinking about these size reduction is sites on a scale of Google or Facebook or Amazon where every kb matters in terms of their operational cost. But these companies probably roll their own.
So who is the "minimal" selling point really for?
W3CSS 6.7KB (gzip)! Beat that. https://www.w3schools.com/lib/w3.css
I wonder what even goes on behind other larger frameworks like bootstrap that makes them so huge.
Small kits can be great, but there are certainly drawbacks that you would never even notice (or rarely notice) with a framework like Bootstrap.
- jQuery's addClass(), 35 lines: https://github.com/jquery/jquery/blob/master/src/attributes/...
- Umbrella JS's addClass(), 5 lines: https://github.com/franciscop/umbrella/blob/master/src/plugi...
So the choice is either well-tested libraries that slows your users down so you'll lose a % of them, optimize the hell out of them so you'll "waste"* time, or use a smaller library which is a compromise between them you'll loose a tiny % of users who you don't support, but you have to invest some time to learn it.
It is not black and white, so luckily we have a choice here and different scenarios warrant for different libraries.
* I specify waste since it's probably something you already know and just have to do it; if you're learning it for the first time then it's not wasted at all
el.addClass("btn btn-primary")
works in JQuery and fails in UmbrellaJS
You can't just exclude other functions like that.
https://github.com/twbs/bootstrap/blob/v4-dev/scss/_card.scs...
.card-outline-warning .card-blockquote .card-footer / .card-header .card-footer &:last-child .card { > .list-group:first-child { .list-group-item:first-child {
etc. etc. It's 280 lines of source code (before you even run auto-prefixer)
Each one of these components repeats styling that other components will use. Because they want it easy to use so you just apply .card instead of individually composing all the style effects you want.
The other day I used semantic-ui, just added in a few components and it was 56k compressed. Because the component ships with support for all options, not just what you use.
That's why plugins like purifycss[1] etc are interesting. When properly used and configured, a developer has the full framework under his fingers, while not outputting anything unused to the users.
The simple answer why it is larger is because it offers far more features/components (and browser support is considerably better).
Presumably that requirement rules out using any of these frameworks because they're all optimized for download size rather than browser support or rendering speed.
Hn is one of the few sites that loads and works.
There's plenty person that for a reason or another are temporarily or long term broadbandless.
They're not getting faster uniformly. Even on my phone, one minute I have high-speed LTE, the next minute I'm on EDGE. Happens a lot during inter-city travel. Not many things piss me off like "simple" sites that fail to load on weak connections, because they're too bloated.
> I can't help but think it may be wasted effort.
Multiplied times the number of users, efficiency improvements in popular software translates to saving quite a lot of electricity. Something worth consideration, IMO.
There are still many people that will access your site via mobile in spotty coverage areas with low speed. Or after they've exhausted their included high speed monthly allotment, and are now throttled.
Also, egress bandwidth at popular clouds is ridiculously expensive. Enough so that the effort of trimming down pays for itself pretty quickly.
For the vast majority of sites out there, though - no, not really.
My mobile data plan isn't unlimited, and that's the case for a lot of people who use mobile to browse the web. Yes the size does matter.
That's like saying Ford thinks Ford makes the best cars.
Either accurate or inaccurate, it's not a relevant point.
Just open dev tools and throttle your connection to 3G, that's what most of your users are seeing. Enjoy!
I will stick with bootstrap just because I am working with it a long time it has WAY more exposure, people building on top of it, contributing...
The difference between 7 KB and 20 KB gzipped is not really that big of a deal for me. Also you can obviously custom build bootstrap and just cut the modules out you don't need.
Also in that context of this small size difference I think its perfectly fine to compare it to the big frameworks out there.