DEV Community

Discussion on: Why CSS Grid is better than Bootstrap for creating layouts

Collapse
 
griessi profile image
griessi

Hmm maybe I'm missing something here but didn't you just describe the basic use case of a framework?

Use Bootstrap: add some classes and let the framework do the work.
vs
Use CSS Grid: write plain CSS with no support from framework.

Of course you are more flexible if you write everything yourself!

In your first Bootstrap example you used 11 classes and no CSS.
With CSS Grid that's 5 classes and 17 lines of CSS code. For me that's not simpler...

And you can stick all the Bootstrap columns in one .row container to reduce markup AND make it possible to do your "Much more flexibility" example with just TWO more classes and NO additional CSS. That is a clear win for bootstrap for me.

If you want to make your page responsive you could add 5 or 6 classes in bootstrap OR write between 50 - 150 lines of complex CSS code yourself.

Your 7 column example is valid of course. If you need a number of columns that are not multiples of 2 you have to write the CSS yourself and for that case CSS Grid is great!

But I do not see any reason to use it on a 6 column layout for example.