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

Utility for the flex-grow property #21944

Closed
tompazourek opened this issue Feb 8, 2017 · 11 comments
Closed

Utility for the flex-grow property #21944

tompazourek opened this issue Feb 8, 2017 · 11 comments

Comments

@tompazourek
Copy link

tompazourek commented Feb 8, 2017

I think there could be an utility class like f-grow-1 that would correspond to CSS rule flex-grow: 1. (possibly also f-grow-2, f-grow-3, etc.)

I've been really enjoying working with the Bootstrap 4 flexbox utility classes, but I feel this one is still missing and could be very useful for a lot of people to do stuff like this:

https://stackoverflow.com/questions/29467660/flexbox-row-how-to-stretch-children-to-fill-cross-axis

If it's a stupid idea, please let me know why.

@tompazourek tompazourek changed the title Utility for the flex property Utility for the flex-grow property Feb 12, 2017
@iatek
Copy link
Contributor

iatek commented Feb 13, 2017

IMO this would be very useful and I've already encountered several use cases for it.

@iatek
Copy link
Contributor

iatek commented Mar 4, 2017

I keep finding more use cases for a flex grow utility..

@manju-reddys
Copy link

manju-reddys commented Mar 13, 2017

May be something like

@toyeca
Copy link

toyeca commented Sep 28, 2017

I would also appreciate this functionality. Bootstrap lets you flex-grow: 1 in horizontal layout using col class, but this functionality is not present for vertical layouts.

@uclaitsscott
Copy link

In my projects, I've added a fill class flex: 1 to cover this since I utilize some fixed width columns and rows inside.

@mdo mdo added this to Inbox in v4.0 stable via automation Dec 28, 2017
@mdo mdo added this to Inbox in v4.1 via automation Jan 3, 2018
@mdo mdo removed this from Inbox in v4.0 stable Jan 3, 2018
@SuperPat45
Copy link

I need also a flex-grow-0 utility for columns that should grow on mobile but not in desktop resolutions like:

<div class="row">
<div class="col-12 col-md"><input /></div>
<div class="col f-grow-md-0"><span>+</span></div>
<div class="col-12 col-md"><input /></div>
</div>

@bertday
Copy link
Contributor

bertday commented Feb 8, 2018

I would definitely use this! :D

@cupofjoakim
Copy link

cupofjoakim commented Feb 8, 2018

+1. We're currently setting and using our own utility for this, but should definitely be part of default utility classes.

Edit: For some of us (myself included) .flex-fillmight do what we needed this for. Actually had to look though the source code to find it though, since it's under the nav section in the docs...

https://github.com/twbs/bootstrap/blob/v4-dev/scss/utilities/_flex.scss#L19

Apparently it was dropped for an unknown reason (mentioned here: #25375).

@mdo mdo removed this from Inbox in v4.1 Feb 11, 2018
@AaronLayton
Copy link

100% back this

@ghost
Copy link

ghost commented Mar 14, 2018

We have a layout where flex-grow-0 and flex-grow-1 would be handy.

@ThinkWired
Copy link

+1

I just created my own help class to do just this.

@mdo mdo added this to Inbox in v4.1 via automation Mar 31, 2018
@mdo mdo added the has-pr label Mar 31, 2018
@mdo mdo closed this as completed in #26168 Apr 1, 2018
v4.1 automation moved this from Inbox to Shipped Apr 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v4.1
  
Shipped
Development

No branches or pull requests