Skip to content

Commit 0354793

Browse files
authored
fix(grid): incorrect margins in compact and very compact grid
Compact and very compact grids had the same margin as the normal grid when they should have had smaller margins. In addition, the layout was working differently for a normal grid vs compact/very compact grids and these changes makes all the grids work consistently.
1 parent 46a91bb commit 0354793

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/definitions/collections/grid.less

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1868,6 +1868,10 @@ each(@colors, {
18681868
Compact
18691869
-----------------*/
18701870

1871+
.ui.ui.ui.compact.grid {
1872+
margin: -(@compactGutterWidth / 2);
1873+
}
1874+
18711875
.ui.ui.ui.compact.grid > .column:not(.row),
18721876
.ui.ui.ui.compact.grid > .row > .column {
18731877
padding-left: (@compactGutterWidth / 2);
@@ -1883,6 +1887,8 @@ each(@colors, {
18831887
.ui.ui.ui.compact.grid > .row {
18841888
padding-top: (@compactRowSpacing / 2);
18851889
padding-bottom: (@compactRowSpacing / 2);
1890+
padding-left: 0;
1891+
padding-right: 0;
18861892
}
18871893

18881894
/* Columns */
@@ -1906,6 +1912,10 @@ each(@colors, {
19061912
Very compact
19071913
-----------------*/
19081914

1915+
.ui.ui.ui[class*="very compact"].grid {
1916+
margin: -(@veryCompactGutterWidth / 2);
1917+
}
1918+
19091919
.ui.ui.ui[class*="very compact"].grid > .column:not(.row),
19101920
.ui.ui.ui[class*="very compact"].grid > .row > .column {
19111921
padding-left: (@veryCompactGutterWidth / 2);
@@ -1921,8 +1931,8 @@ each(@colors, {
19211931
.ui.ui.ui[class*="very compact"].grid > .row {
19221932
padding-top: (@veryCompactRowSpacing / 2);
19231933
padding-bottom: (@veryCompactRowSpacing / 2);
1924-
padding-left: (@veryCompactGutterWidth * 1.5);
1925-
padding-right: (@veryCompactGutterWidth * 1.5);
1934+
padding-left: 0;
1935+
padding-right: 0;
19261936
}
19271937

19281938
/* Columns */

0 commit comments

Comments
 (0)