4 ms·
> CSS grid > If you’re still using heavy-weight grid frameworks from UI toolkits like Bootstrap or Foundation, you are falling behind. This is a pretty sensat
by Etheryte 8y ago
> CSS grid
> If you’re still using heavy-weight grid frameworks from UI toolkits like Bootstrap or Foundation, you are falling behind.
This is a pretty sensationalist way to word this and honestly an absurd statement as a whole. If you have a public-facing site, ignoring everything that isn't up-to-date is a luxury you can't afford and blunt statements like these show ignorance in that regard.
- cageface 8y agoCSS grid is supported in all modern browsers. Depending on your audience, there is a very good chance you can use it in favor of older and much less powerful and pleasant grid layout tools.
- Etheryte 8y agoThat's the point exactly, when you're building a public facing website, depending on your client audience it's very likely that you're not building only for modern browsers. Heck, the same holds for a large part of non-public projects as well.
- technojunkie 8y agoProgressive Enhancement takes care of an acceptable fallback for browsers that don't support the standard.
- maigret 8y agoIn that case, that’s what is called “graceful degradation”, progressive enhancement goes the other way around (code for older browsers, then provide cool features for newer browsers). Like desktop first vs mobile first.
- koboll 8y agoAccording to CanIUse, it's supported in browsers used by 88% of users in the United States. Which means sites will fail to render properly in 12% of browsers. Developing for a b2b or enterprise product? That percentage is going to be lower. Developing for users outside advanced industrial countries? Lower. And it's not like you can polyfill it or use a fallback -- CSS grid is a completely new way of building layouts that isn't amendable to automatic fallbacks, so you literally have to build an entirely different parallel way to do the same thing if you want those 12% to have the same experience. At that point... why bother using CSS grid at all? The simple and sad fact is that until IE 10/11 fall totally out of use, grid is simply not worth learning for many projects.
- cageface 8y agoCSS grid works in IE11 with a few restrictions. Requiring IE11+ support is quite common for websites targeting the US market at least. Unless your audience is pretty unusual it's easy to make a case for excluding older browsers than this.
- naniwaduni 8y agoYou can use what is, essentially, a totally different grid layout engine which works in IE11 only, but fortunately doesn't interfere too much with the more recent grid spec since everything is vendor-prefixed. It is not just "a few restrictions"; you can't even get close to a grid-based layout that works in IE10/11 by accident. It's doable, but practically, it might be a fairly reasonable decision to give up on giving IE the nice layout and falling back to a flat "mobile" layout, if you're doing progressive enhancement properly.
- koboll 8y agoOn my own personal projects where I have the authority to make broad declarations like "IE11 is marginal enough to be served the mobile version", that works. But try explaining that to a corporate executive. The cost-benefit analysis is not really in favor of jumping to grid for most mass-market products.
- juddlyon 8y agoTry explaining when to use Flexbox vs CSS Grid vs Floats to someone who isn't a hardcore front-end coder. Then it's time for PostCSS, because now we use JS to write CSS.
- btbuildem 8y agoYou can try to explain it like this: Grid behaves in a way that makes sense. Flex a little less so. Everything that came before it is a complete, absurd nightmare.
- randomsearch 8y agoIf I switch to Grid for layout, don’t I still need Bootstrap for other things, eg toolbars, buttons....? Or is there a more lightweight choice for those?
- GordonS 8y agoUnless you want to create your own styles for components like buttons from scratch, yes, you will still need a CSS framework. There are a plethora of such frameworks available today, many of which are lighter than Bootstrap (and don't require JQuery). I'm very familiar with Bootstrap though, so I'll personally continue to use it for a long time to come, unless there is a really compelling reason to use another framework.
- eswat 8y agoIt’s pretty sensationalist but I don’t disagree with the content of the message: by sticking with a float or flexbox-based grid system from a framework, you’re not learning the intricacies of newer tech like grid. That being said, for most of my professional and personal work I only see grid as an incremental improvement over flex. It’s cool but time I spent learning it I could have just used what I already knew and create more things the customer actually cares about.