3 ms·
> Short of taking care of sizing the elements yourself, sadly, you can't have both a vertical and horizontal rhythm by just using flexbox alone. Accompanied by
by nailer 10y ago
> Short of taking care of sizing the elements yourself, sadly, you can't have both a vertical and horizontal rhythm by just using flexbox alone.
Accompanied by https://developers.google.com/web/updates/images/2017/01/css-grid/alignproblem.png https://developers.google.com/web/updates/images/2017/01/css...
I'm pretty familiar with Flex but I simply don't understand and the diagram doesn't help. What does 'rhythm' mean in terms of layout?
Taking a guess (which I shouldn't be), I can make https://developers.google.com/web/updates/images/2017/01/css-grid/examplelayout.png https://developers.google.com/web/updates/images/2017/01/css... with flex, but I'd have header and rest-of-page as columns, then have rest-of-page as a row with nav and content, then content as a column with content and footer. I think the article is saying:
> CSS grid means I can do it all at once rather than continually having to make rows and columns.
But it doesn't actually say that anywhere (and again I'm guessing).
- ddebernardy 10y agoOP is likely referring to vertical rhythm in typography: https://zellwk.com/blog/why-vertical-rhythms/ https://zellwk.com/blog/why-vertical-rhythms/
- jfoutz 10y agorhythm, or perhaps repetition is one of the core tenants of graphic design. Once you start looking for it, you'll see it lots of places. It's kind of like the wilhelm scream sound effect. It's not hard to find strong examples, but most stuff is divided into a natural harmonic, 1/3 1/4 or 1/5. movie posters are an easy example. Anywho, google helps a bit, [1]. So, yes, you're absolutely right. it's just quite a bit more widespread than typography [1] https://www.google.com/search?q=rhythm+in+painting&espv=2&biw=1116&bih=761&tbm=isch&tbo=u&source=univ&sa=X https://www.google.com/search?q=rhythm+in+painting&espv=2&bi...
- bobwaycott 10y agoNerdy nit: you mean to use the word tenets, not tenants. :)
- nailer 10y agoYes but that just uses it in the commonly understood sense of repetition. And you can very obviously achieve vertical and horizontal repetition using flex. Either they have a more specific meaning or they're trying to say something that's not quite apparent.
- laszlokorte 10y agoAs I understand this image: https://developers.google.com/web/updates/images/2017/01/css-grid/alignproblem.png https://developers.google.com/web/updates/images/2017/01/css... it shows that you can not use flexbox to force the both upper blocks being the same height.
- svachalek 10y agoRight. With flex you can create elements whose height is equivalent to the elements to the left and right, or whose width is equivalent to the elements above and below, but not both at the same time.