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

Add grow to xy-cell-base #10689

Merged
merged 2 commits into from
Oct 3, 2017
Merged

Conversation

flatline-studios
Copy link
Contributor

Add the ability to use the xy-cell-base mixin to grow the flex item to take up all available space.

This is effectively the same as: .flex-child-grow, found @ https://foundation.zurb.com/sites/docs/flexbox-utilities.html#vanilla-flexbox-helper-classes - But there isn't a way to do this through the current SASS mixins.

Verified

This commit was signed with the committer’s verified signature.
Byron Sebastian Thiel
Added the ability to use the xy-cell-base mixin to grow the flex item to take up all available space.

This is effectively the same as: `.flex-child-grow`, found @ https://foundation.zurb.com/sites/docs/flexbox-utilities.html#vanilla-flexbox-helper-classes - But there isn't a way to do this through the SASS mixins.

Verified

This commit was signed with the committer’s verified signature.
Byron Sebastian Thiel
Updated the comment, and by extension, the docs to include the extra parameter.
@kball
Copy link
Contributor

kball commented Oct 3, 2017

This seems reasonable to me. @brettsmason any objections?

@brettsmason
Copy link
Contributor

@kball No problem with it, though isn't grow the same as our auto behaviour?
In hindsight I probably would of called it grow rather than auto but oh well 😄

@flatline-studios
Copy link
Contributor Author

flatline-studios commented Oct 3, 2017

@brettsmason Unfortunately not...

AUTO:
flex: 1 1 0px;
GROW (proposed):
flex: 1 0 auto;

Because auto has the flex-basis set to 0px, as well as being told it can shrink, then it won't grow, it will just fit in to whatever is left over.

grow would mean, "Take up AT LEAST your minimum space, and ALWAYS take up some amount of the remaining space (depending on other flex-grow: n elements), but NEVER take up less".

It's basically more aggressive than the flex: 1 1 0px that's set up for auto currently, which fits in with what I'd expect auto to do a lot more, so I think the name auto is perfectly suited.

@brettsmason
Copy link
Contributor

@flatline-studios Thanks for confirming and apologies for my slight lack of understanding there 😄
Sounds a decent idea to me in that case.

@rafibomb rafibomb merged commit fa9c115 into foundation:develop Oct 3, 2017
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

Successfully merging this pull request may close these issues.

None yet

4 participants