Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[objects.layout] Use flexbox #380

Open
florianbouvot opened this issue Oct 13, 2018 · 6 comments
Open

[objects.layout] Use flexbox #380

florianbouvot opened this issue Oct 13, 2018 · 6 comments
Projects
Milestone

Comments

@florianbouvot
Copy link
Member

No description provided.

@florianbouvot florianbouvot added this to the 7.0.0 milestone Oct 13, 2018
@florianbouvot florianbouvot added this to To do in Road to v7 Oct 13, 2018
florianbouvot pushed a commit that referenced this issue Oct 13, 2018
florianbouvot pushed a commit that referenced this issue Oct 13, 2018
florianbouvot pushed a commit that referenced this issue Oct 13, 2018
florianbouvot pushed a commit that referenced this issue Oct 13, 2018
florianbouvot pushed a commit that referenced this issue Oct 13, 2018
florianbouvot pushed a commit that referenced this issue Oct 13, 2018
@florianbouvot florianbouvot moved this from To do to In progress in Road to v7 Oct 13, 2018
@herzinger
Copy link
Contributor

I usually use this project: https://github.com/nicoqh/inuit-flexgrid

It's probably a good reference.

@florianbouvot
Copy link
Member Author

@herzinger agree, there are more options for alignement... (with a way to configure it). I admit that I often work with a simple object and use flex box utilities to go further (because of responsive issue - modifiers are not responsive...).

@kkalvaa
Copy link

kkalvaa commented Dec 28, 2018

Layout should be using grid, not flexbox by now. With 88.35% global support according to Can I Use (https://caniuse.com/#search=grid) grid is now mature enough to be the preferred method for laying out content in 2 dimensions. Flex is great for 1 dimension, but comes up short in 2.

Then again I'd argue grid has removed the need for a grid system in a css framework.

@solleer
Copy link

solleer commented Dec 28, 2018

Layout does not specify how many rows there are while the grid property requires that to be set ahead of time. They fulfill different uses.

@kkalvaa
Copy link

kkalvaa commented Dec 31, 2018

No, you do not. The browser will create as many implicit rows as necessary. Ref.: https://gridbyexample.com/examples/example10/

If you define a 4 column grid and put 12 children in there the browser will then automatically create 3 rows. If one of those children is set to span 4 columns the grid will now have 4 rows without you setting anything. You can also set a child to span X rows, something you cannot do with flexbox or inline-block.

You can explicitly set rows, which is nice if you have specific areas in mind, but you do not have to, the browser will do it for you.

@herzinger
Copy link
Contributor

As you said, there's no need for a framework structure to use css grids. Inuitcss is fully modular, if you feel comfortable using grid for everything, simply don't import the layout object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Road to v7
In progress
Development

No branches or pull requests

4 participants