CSS grid is incredible too. I can’t believe how spoiled we are now with amazing layout options.
CSS grid is incredible too. I can’t believe how spoiled we are now with amazing layout options.
[0] https://css-tricks.com/snippets/css/a-guide-to-flexbox/
[1] https://css-tricks.com/snippets/css/complete-guide-grid/
- "justify-" is for the primary axis.
- "align-" for the secondary one
- "-content" is for grid tracks / rows in flex-wrap containers.
- "-items is for individual children (within the row / grid cell)
I would also definitely prefer clearer names.
What's going on with the red text all the way on the left of the news items? It does not appear to be the same thing as the bichig...?
I don’t know if that’s the only reason, so I’m not gonna say it was a bad choice. But at least to me, I’m exactly like you in the sense that I can’t remember which one is which. I would have preferred either better naming that references the axis, or simply have the attributes be independent of the parent. Until then, I have to use a cheat sheet.
Further, there's no "bottom to top" mode for horizontal scripts, but vertical modes can have a block axis running either ltr or rtl, affecting the direction of the flex cross axis. Which likely leads to the necessity to also abstract "row-reverse" and "column-reverse" directions for the ordering of items.
now as for distribution of items on either axis (whichever direction it may have), referring rows/columns when might become misleading, and also having to address individual rows (align-content) complicates things. Finding another set of terms for flexbox alone might start to become messy, since display:grid and multicolumn layouts will also require these settings.
I don't know the actual origin of align & justify either, but I have the feeling coming up with better terms might not be that easy
For items vs content: You always have items no matter what. But you don't need to do anything to the entire content besides justify/align until you have multiple rows with flex-wrap. There's simply no effect that align-content could possibly have here. So items is for individual children, and content is for entire rows.
So tldr: Justify is like the "justify" option in word processors, and align is the opposite one; you always have items, but aligning the content won't change anything until you have 2 rows/cols.
Remember these 2 things and you probably won't forget which is which ever again.
(That said, I do often forget if flex starts out row or column, but that's relatively unimportant to know, because the way I get around this is by always adding the direction when I say "display:flex".)
Actually though, not really an analog, but surprisingly something not many people are aware enough of - https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical...
Helps a lot when working with applications that need to support both LTR and RTL languages.
there are so many shims and polyfills amongst actual solutions now