Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Whoa. I had no idea grids were so powerful. This is pretty much endgame in layout. Is there a similar system for iOS and Android? Don’t think auto layout or constraints work this way.

https://caniuse.com/css-grid



i love grids, but one quick word of warning: currently, there is not yet support for subgrid (with column/row definitions synched). meaning each grid cell must be a direct child of the grid parent. this gets in my way constantly when i'm trying to do some responsive layout change.


Firefox has supported it since December 2019 ;)

(Yeah, I know that doesn't help with the prevalence of Chrome, but it's worth pointing out since if nothing else it means you can already start learning it)


I've had some success with setting `display: contents` on grid children to avoid having to flatten everything. More detail here: https://css-tricks.com/get-ready-for-display-contents/

It's not a substitute for subgrids, but it does help in some situations.


I had the same realization as you - I thought Flexbox was endgame until I really got into Grid. Both are still very useful, but more and more I see myself using Grid over display flex.


The support is very poor yet. What about built-in browser in a 5 years old smartphone?

Don't use new technologies, wait for 5 or 10 years until they are supported everywhere. Flexbox is good enough for 99% of cases.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: