Skip to content

Commit

Permalink
fix(grid): prevent .flex from growing instead of using max-width (#3491)
Browse files Browse the repository at this point in the history
* fix(grid): prevent .flex from growing instead of using max-width

fixes #3470

* fix(grid): allow .grow and .shrink to override non-default flex values
  • Loading branch information
KaelWD authored and johnleider committed Mar 11, 2018
1 parent 9392f93 commit 8e83ce6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/stylus/components/_grid.styl
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,14 @@ for size, width in $grid-breakpoints
for n in (1..$grid-columns)
.flex.{size}{n}
flex-basis: (n / $grid-columns * 100)%
max-width: (n / $grid-columns * 100)%
flex-grow: 0

.flex.order-{size}{n}
order: n

for n in (0..$grid-columns)
.flex.offset-{size}{n}
// Offsets can only ever work in row layouts
margin-left: (n / $grid-columns * 100)%

.flex,
Expand Down Expand Up @@ -133,10 +134,12 @@ for size, width in $grid-breakpoints
flex-grow: 1 !important

.grow
flex-grow: 1 !important
flex-shrink: 0 !important

.shrink
flex-grow: 0 !important
flex-shrink: 1 !important

.scroll-y
overflow-y: auto
Expand Down

0 comments on commit 8e83ce6

Please sign in to comment.