Skip to content

Commit df1daf8

Browse files
committed
fix: switch grid system over to using the font-size inline-grid whitespace trick to fix spacing issue in Safari.
1 parent f069b80 commit df1daf8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/_patterns/01-core/05-objects/bolt-grid-object/_objects.grid.scss

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,25 @@
22
#GRID
33
========================================================================== */
44

5+
/**
6+
* 1. Workaround to Safari layout getting thrown off when using a negative letter-spacing to remove inline-block whitespace
7+
* @TODO: remove when v1 grid with CSS Grid support rolls out
8+
* 2. Reset local font-size inheritance to prevent components w/o default font sizes from breaking
9+
*/
510
.o-bolt-grid {
11+
font-size: 0; /* stylelint-disable-line */ /* [1] */
612
margin: 0;
713
padding: 0;
814
list-style: none;
915
margin-left: bolt-spacing(medium) * -1;
10-
letter-spacing: bolt-spacing(medium) * -1;
1116
flex: 1 1 auto; //Automatically auto fill any available space, in case a grid is nested inside of a flexbox-friendly parent container.
1217
}
1318

1419
.o-bolt-grid__cell {
1520
display: inline-block;
1621
vertical-align: top;
1722
padding-left: bolt-spacing(medium);
18-
letter-spacing: normal;
23+
font-size: 1rem; /* stylelint-disable-line */ /* [2] */
1924
}
2025

2126

0 commit comments

Comments
 (0)