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

Auto flex column #43

Closed
Wooody82 opened this issue Apr 1, 2017 · 2 comments
Closed

Auto flex column #43

Wooody82 opened this issue Apr 1, 2017 · 2 comments

Comments

@Wooody82
Copy link

Wooody82 commented Apr 1, 2017

Hi,
I am just wonder if this feature already exist..
something like this:
https://codepen.io/dudleystorey/pen/Kgofa

And its not the same as grid__col-auto.

<div class="grid_auto">
<div>...</div>
<div>..</div>
</div>
@leejordan
Copy link
Owner

leejordan commented Sep 18, 2017

The tricky thing about this is that you need to set a width on the columns for this to work. So I'm unsure if it's worth adding a width because who knows what width is the most generic and useful? This feels like something that can be built on top of the grid and I am considering producing example SCSS and html on the example page rather than add something to the core grid that I can't ensure is generically useful.

@leejordan
Copy link
Owner

After looking into this in a bit more detail I can show you how to achieve this for yourself. In the current version (2.0.0) of reflex, you could modify this line and set a basis (effectively a min-width) for auto cols

https://github.com/leejordan/reflex/blob/master/scss/includes/_mixins.scss#L32

The example you linked to use 200px so change this line to:

    @include flex(1, 0, 200px); // a unit on last value is required by IE10-11

This will replicate the behavior of the linked grid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants