|
|
|
|
|
by wa1987
2116 days ago
|
|
For sure! Whipped up a quick pen: https://codepen.io/willem-aart/pen/oNxwRXY?editors=1100 This is impossible to achieve with CSS Grid. One might alternatively approach this 'cluster layout' using inline-block elements. However, these elements would then be separated by space characters and the width of the space would be added to any applied margins. These issues could possibly be resolved by resorting to hacks such as setting font-size: 0 on the parent. Not pretty. On the other hand, when using flexbox, space characters between flex childs are ignored which makes it a good fit for this kind of layout. |
|
I would prefer a more boring but simpler to code world of CSS. However I am going to look into flexbox more. Thanks for your pen!