3 ms·
On my current project, I spent a lot of time fighting with flexbox and could never get it to do exactly what I wanted, in both Firefox and Chrome, at the same t
by jcadam 9y ago
On my current project, I spent a lot of time fighting with flexbox and could never get it to do exactly what I wanted, in both Firefox and Chrome, at the same time (Firefox was much easier to deal with using flexbox than Webkit/blink, actually)
Then CSS Grid finally became available accross all major browsers. I'd never used it, but decided to try it and managed to have my layout working the way I had always wanted it to in a couple of minutes. In fact, it took more time for me to explain to my concerned wife why I suddenly burst out howling and laughing like a lunatic than it did to actually swap out flexbox for CSS-grid.
Still using bootstrap for a good portion of the UI, of course :)
- BrandoElFollito 9y agoI read everywhere that both are complimentary. I am a complete amateur in web dev but the only place where I can imagine flexbox in an otherwise grid display is when divs are stacked and we do not know how many divs there will be. If grid has a way to address these unpredictable divs (not knowing how many there will be) then my last use case is closed.
- jcadam 9y agoI'm definitely more of a backend developer myself, but of course I have to do the frontend work on my own projects. For my use case, I'm using CSS Grid on this project (https://www.contabulo.com https://www.contabulo.com) to manage the layout of 'cards' on a 'board', where the number of cards is variable. I was originally using flexbox, which proved to not be.. flexible enough to manage it properly (and there were some annoying behavioral differences between browsers). I was worried I was going to have to resort to some Javascript-hackery when I happened upon CSS-grid being mentioned in an HN post a while back. Luckily, support for grid was added to all of the major browsers not long after I discovered it :)