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

Make equal-width flexbox extend grid-column #20775

Closed
wants to merge 4 commits into from
Closed

Conversation

vinpac
Copy link

@vinpac vinpac commented Sep 23, 2016

Fixed equal-width flexbox columns, so now they will act like normal columns as they break.

Fixed equal-width flexbox columns so now they will act like normal columns as they break.
@include media-breakpoint-up($breakpoint, $breakpoints) {
// Provide basic `.col-{bp}` classes for equal-width flexbox columns
@if $enable-flex {
.col-#{$breakpoint} {
position: relative;
width: auto !important;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered flex-basis, flex-grow, width, max-width, min-height

@vinpac
Copy link
Author

vinpac commented Sep 24, 2016

A col-fill would be a great feature too, but I'm looking for more real world examples before adding it.

.col-fill {
  flex: 1 1 auto;
}

@mdo
Copy link
Member

mdo commented Sep 26, 2016

What does this fix exactly? I don't see the benefit of this without a JS Bin or demo showing the before and after.

@@ -28,18 +28,22 @@
@extend %grid-column;
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line contains trailing whitespace

@vinpac
Copy link
Author

vinpac commented Sep 26, 2016

These equal-width flexbox classes aren't breaking as normal columns do. When they were supposed to break, they just don't break, making the breakpoints useless on them. It happens because they were not extending %grid-column.

Here's an example: https://jsbin.com/baqoriqagu/edit?html,css,output

Just change the $equal-width-flex-extend-grid-column to see the difference.

@mdo mdo mentioned this pull request Oct 3, 2016
@mdo mdo closed this in 88c601a Oct 3, 2016
@mdo
Copy link
Member

mdo commented Oct 3, 2016

Gotcha. Okay, I took a look and cleaned some things up in #20829. Thanks!

@mdo mdo added this to the v4.0.0-alpha.5 milestone Oct 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants