rohitkrai03 / pills

A simple responsive CSS Grid for humans. View Demo -

Home Page:https://rohitkrai.dev/pills

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why not flexbox?

abacaj opened this issue · comments

Why did you choose to support IE8? Why not move forward with flexbox?

Besides lack of good cross-browser support until recently, I think there are a few reasons why flexbox is still less popular than float- or margin-based grids:

  • Steeper learning curve and less accessible than adding a class like "col-3" or "grid--1/2". The latter is almost self-explanatory.
  • Requires an existing or new CSS class to bind the styles to. If it's a new class, you have to figure out a good name (which isn't always easy, naming things is hard).
  • Requires editing CSS/Less/Sass, which (depending on your setup) can require waiting for it to compile. The wait time for compiling/bundling HTML is usually negligible.
  • Traditional grid systems just work, and they work well enough for most things. When you have more important & interesting problems than a CSS grid system, there's a bias towards shipping what works and moving on.

Steeper learning curve and less accessible than adding a class like "col-3" or "grid--1/2". The latter is almost self-explanatory.

  • Is this true for all cases? Flexbox is very declarative and I believe your case on class naming is based on your subjective experience rather than measurable facts. Systems and guidelines like OOCSS, BEM, SMACSS & http://maintainablecss.com/ make this easier than you claim.

Requires an existing or new CSS class to bind the styles to. If it's a new class, you have to figure out a good name (which isn't always easy, naming things is hard).

Requires editing CSS/Less/Sass, which (depending on your setup) can require waiting for it to compile. The wait time for compiling/bundling HTML is usually negligible.

  • Again, this doesn't really justify using older techniques (float based) to solve a problem that is now being supported natively across 94% of browsers.

Traditional grid systems just work, and they work well enough for most things. When you have more important & interesting problems than a CSS grid system, there's a bias towards shipping what works and moving on.

  • Yes, traditional grid systems do work. So does flexbox on 94% of browsers. http://caniuse.com/#feat=flexbox.
  • This is like saying "table grid systems still work" - yes they do but they clearly impose limitations, just like float based layouts do. Just because it works doesn't mean you should be using it. Also becoming a better developer means adopting newer technologies. And hey, flash still works on the web, but we clearly stopped using it :)

The above are just my two cents and opinion. I am frustrated partly because I'm very tired of people releasing new grid systems, which actually aren't new and solve the same problem all over again using the same technique all over again.

Well, i never said i'm a pro or anything. I just created something which i find very useful. For me it works now but i am also thinking of doing something similar using flex. Thanks for explaining a lot of things, i've learnt a lot and will try to implement it in future.