Skip to content

Commit

Permalink
fix(grid): collapse vertical gutters
Browse files Browse the repository at this point in the history
fixes #11408

(cherry picked from commit c3ba5bd)
  • Loading branch information
KaelWD committed Dec 23, 2020
1 parent ed46cfb commit d0f25fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions packages/vuetify/src/components/VGrid/VGrid.sass
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
+make-row

&--dense
margin-right: -$form-grid-gutter / 2
margin-left: -$form-grid-gutter / 2
margin: -$form-grid-gutter / 2

> .col,
> [class*="col-"]
Expand All @@ -25,8 +24,7 @@
// Remove the negative margin from default .row, then the horizontal padding
// from all immediate children columns (to prevent runaway style inheritance).
.no-gutters
margin-right: 0
margin-left: 0
margin: 0
> .col,
> [class*="col-"]
padding: 0
Expand Down
3 changes: 1 addition & 2 deletions packages/vuetify/src/components/VGrid/_mixins.sass
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
display: flex
flex-wrap: wrap
flex: 1 1 auto
margin-right: -$gutter / 2
margin-left: -$gutter / 2
margin: -$gutter / 2

=make-col-ready($gutter: $grid-gutter)
// Prevent columns from becoming too narrow when at smaller grid tiers by
Expand Down

4 comments on commit d0f25fc

@hmawla
Copy link

@hmawla hmawla commented on d0f25fc Jan 2, 2021

Choose a reason for hiding this comment

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

This ruined my whole layout after the update, so maybe it's best to set it as a breaking change.

@chrisnruud
Copy link

Choose a reason for hiding this comment

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

basically sets all top and bottom margins to -12 instead of 0, and jest will not pick up on changes like these. Breaking here as well

@csimpkins22

This comment was marked as spam.

@DomDomHaas
Copy link

@DomDomHaas DomDomHaas commented on d0f25fc Jan 6, 2021

Choose a reason for hiding this comment

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

Yes, please mark as breaking change!
I guess when the grid margins / paddings change that's going to be breaking changes.

@hmawla Did you have to change the no-gutters attribute in nested grids?

Please sign in to comment.