News for hackers. Stuff that matters.
Re:Ask HN: Resources to learn basic UI layout design for Rea... by virgil_disgr4ce on Thursday April 09, 2020 @11:15AM (#22823322)
Yes. If I'm interpreting OP correctly, the single answer to the question is flex. It can seem like a weird API (I STILL to this day have to look up certain things), but once you get used to it it is GREAT.

Also, if you're using styled-components (which I recommend), use styled-flex-component for layout and things get even better. It's such a breeze, it makes even complicated layouts so simple and fast to put together.

Re:Ask HN: Resources to learn basic UI layout design for Rea... by nkozyra on Thursday April 09, 2020 @12:11PM (#22823917)
I migrated to CSS grids as soon as I could but find a lot of people still lean on flexbox. Is that just preference, older browser support ...? Are there things you can't do in grid?
Re:Ask HN: Resources to learn basic UI layout design for Rea... by JamesSwift on Thursday April 09, 2020 @01:54PM (#22825294)
The two occupy a venn diagram of functionality. They do some stuff the same, but they also both do unique things the other doesnt. See this for a good rundown: https://www.youtube.com/watch?v=hs3piaN4b5I