3 ms·
You can grab just the grid part of Bootstrap. It's 13kb. There's a lot of grids out there and people can make their own, but someone may be used to Bootstrap's.
by sotojuan 11y ago
You can grab just the grid part of Bootstrap. It's 13kb. There's a lot of grids out there and people can make their own, but someone may be used to Bootstrap's.
- paulojreis 11y agoYes, of course, that would be a wise thing to do. No problem at all with that. But surely you can spare a few extra bytes by implementing your own, while still using essentially the same "battle-tested" Bootstrap approach. Also, you wouldn't be constrained. Bootstrap means a predefined set of breakpoints for responsiveness: you can change their values, but not their number - you'll always get 4 breakpoints. Bootstrap also means a float-based grid system; you may want a flexbox based solution if you're targeting new browsers. And, of course, another pet peeve of mine: Bootstrap-powered HTML source-code looks all the same (a bunch of .row and .col.xs-N). Of course, you can use the mix-ins, but I think every Bootstrap user can relate: the mark-up for the user details page looks an awful lot like the order page. :) I actually prefer to write (and, even more, maintain) mark-up with semantic classes. As I said above, it's not a big problem and using only the grid is a wise thing to do. I just don't think it adds that much; might as well implement it myself, targeted to my needs (and I'll do it once or twice, then reuse).
- johnmaguire2013 11y agoIt's no longer "battle tested" if you're doing it yourself. You just created all the bugs Bootstrap fixed over the years. That's called reinventing the wheel. Is a few extra bytes worth it? Why waste the time rewriting it?
- paulojreis 11y agoI don't think writing a custom grid system is reinventing the wheel, since it's a task too small to even employ such consideration. It's like saying creating a folder structure for your project is reinventing the wheel. Anyway, there's a rather diffuse line between reinventing the wheel and optimizing/fitting your own particular needs. I can easily agree that I've ended up - many times - in the first region while trying to reach the latter. Still, I'd say "no harm" if a) you got a cleaner, more legible source code; b) you got a better grasp of your solution; c) you're learning; and d) saving a few milliseconds from each of your users.
- kbenson 11y agoNIH-ism is apparently still strong with web developers. For consideration, sure, you can write your own PNG reader for your back-end by following the spec, and you might make it a bit faster than the commonly available libraries by coding in some assumptions about your use case, but should you? The answer is rarely yes (but rarely isn't never).
- paulojreis 11y agoI'd say a PNG reader and a CSS grid system aren't quite comparable in scope and complexity. See my reply to the sister post. Also, bear in mind that "grid system" doesn't always mean "float-based,12-column and 4 breakpoint based grid system".