[refs #380] [objects.layout] Use flexbox#384
Conversation
|
|
|
(2) When you removed So the flex items used to have From this sample markup; |
|
@LayZeeDK that's right and instead I think adding flexbox utilities can be beneficial. In the two demo In this example, I think that when PS : |
|
This is great... some examples of simple grid layouts and markup examples to experiment with (maybe on codepen) would be great. 👍 |
|
What about considering an option between using a traditional grid with inline-block and a flex grid. I'm pretty sure I saw a discussion somewhere that inuitcss was confident of their grid and had no intention to swapping to flexbox. Perhaps an option to choose between the two would be best. Also I think |
|
@xavianaxw I think we can move to flexbox and keep code simple, widths utilities will works same as v6... |
It was in a pretty old issue, before the decision to stop supporting old browsers in v7. The original grid works great and was backwards compatible, but without that requirement flexbox is just a simpler, better solution. |
|
Ah right. I'm all in for flexbox anyway! |
|
I think @LayZeeDK had a good argument by pointing out the missing stretch modifier. I think this should be part of the layout object via the currently available I’m not a fan at all of achieving this behaviour with an additional <div class="o-layout">
<div class="o-layout__item u-1/2">
...
</div>
<div class="o-layout__item u-1/2">
...
</div>
</div>If I want the items to align in their height no matter what, I want this to determine on the BEM block, i.e. <div class="o-layout o-layout--stretch">
<div class="o-layout__item u-1/2">
...
</div>
<div class="o-layout__item u-1/2">
...
</div>
</div>I don’t want to mess with adding some utility classes on each item, because to me, this is the job of the layout object—modifying how elements of the object behave. |
| ## [Unreleased] | ||
|
|
||
| ### Breaking changes | ||
| - `objects.layout` use `flexbox` instead of `inline-block` so we remove `o-layout__item` and `o-layout--stretch` because they are no longer needed. [[#380](https://github.com/inuitcss/inuitcss/issues/380)] |
There was a problem hiding this comment.
use -> uses.
But possibly this whole changelog entry can be removed, if we decide to keep the .o-layout__item element class and the --stretch modifier.
There was a problem hiding this comment.
Since 2018, I update my personal grid system and I think using flex box utilizes is better than lot of modifier in any object. I will share my approach as soon as possible.
|
I agree with @csshugs. Overall I don't really like to use utilities apart from what is indispensable, and if you wanna modify the behavior of all children uniformly, a modifier is the right approach. |

No description provided.