or you could just use flexbox to do the exact same thing and have a superset of that extremely broad support, including ie11 without having to rely on any kind of magic.
I do use grid when I need it, but I don't see the point of using grid in places where flexbox will do. Granted this is on the verge of not mattering at all anymore, but I just don't see the point in using something less compatible when you don't have to.
Re:CSS Tips
by schwartzworld on Monday April 26, 2021 @05:10PM
(#26948186)
I want to learn grid, and I keep waiting to be given a layout I can't implement in flexbox as an excuse. It's been years of waiting through multiple jobs.
Re:CSS Tips
by sodapopcan on Monday April 26, 2021 @07:23PM
(#26949599)
I like grid because it eliminates the need for any elements that
exist purely for layout. This makes markup cleaner which makes it easier to change in the future.
But as I stated in elsewhere in this thread, grid is not a replacement for flexbox. There is overlap, they both have their strengths.
the one thing i couldn't do with flexbox where I had to use grid was a sidebar that was being rearranged responsively, part of it below the main content, and part of it above. but yeah, most of the time flexbox + order can get you quite far
An acceptable subset of CSS Grid works on IE11. And if you use autoprefixer, 99% of the time would work out of the box.
I have not found this to be true at all. It's far less than 99%, and would require double checking all your work in IE11 to make sure it works. I tried some basic layouts and found that a lot of unexpected things occurred. If you're supporting IE11, CSS grid isn't worth it.
https://caniuse.com/css-grid
The notable exception is IE 11…though even then, with a bit of autoprefixer magic, you may be able to use this.