Skip to content

Commit 1140bfe

Browse files
authored
Merge pull request #131 from Slicejack/gmail-media-queries-fix
#130: Added responsive utilities classes with "-" character.
2 parents 1f36458 + bf5aaf0 commit 1140bfe

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

src/sass/_utilities.scss

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,27 +46,32 @@
4646

4747
@media (max-width: $breakpoint-mobile) {
4848
.block\:sm,
49-
.block\@sm {
49+
.block\@sm,
50+
.block-sm {
5051
display: block !important;
5152
}
5253

5354
.table\:sm,
54-
.table\@sm {
55+
.table\@sm,
56+
.table-sm {
5557
display: table !important;
5658
}
5759

5860
.table-row\:sm,
59-
.table-row\@sm {
61+
.table-row\@sm,
62+
.table-row-sm {
6063
display: table-row !important;
6164
}
6265

6366
.table-cell\:sm,
64-
.table-cell\@sm {
67+
.table-cell\@sm,
68+
.table-cell-sm {
6569
display: table-cell !important;
6670
}
6771

6872
.hidden\:sm,
69-
.hidden\@sm {
73+
.hidden\@sm,
74+
.hidden-sm {
7075
display: none !important;
7176
}
7277
}
@@ -116,17 +121,20 @@
116121

117122
@media (max-width: $breakpoint-mobile) {
118123
.text-left\:sm,
119-
.text-left\@sm {
124+
.text-left\@sm,
125+
.text-left-sm {
120126
text-align: left !important;
121127
}
122128

123129
.text-center\:sm,
124-
.text-center\@sm {
130+
.text-center\@sm,
131+
.text-center-sm {
125132
text-align: center !important;
126133
}
127134

128135
.text-right\:sm,
129-
.text-right\@sm {
136+
.text-right\@sm,
137+
.text-right-sm {
130138
text-align: right !important;
131139
}
132140
}
@@ -260,7 +268,8 @@
260268
@each $spacer-key, $spacer-value in $spacers {
261269
@if $spacer-key != 'auto' {
262270
.p-#{$spacer-key}\:sm,
263-
.p-#{$spacer-key}\@sm {
271+
.p-#{$spacer-key}\@sm,
272+
.p-#{$spacer-key}-sm {
264273
padding-top: $spacer-value !important;
265274
padding-right: $spacer-value !important;
266275
padding-bottom: $spacer-value !important;
@@ -272,13 +281,15 @@
272281
@if $spacer-key != 'auto' {
273282
@if $spacing-side-key == 'horizontal' {
274283
.p#{$spacing-side-value}-#{$spacer-key}\:sm,
275-
.p#{$spacing-side-value}-#{$spacer-key}\@sm {
284+
.p#{$spacing-side-value}-#{$spacer-key}\@sm,
285+
.p#{$spacing-side-value}-#{$spacer-key}-sm {
276286
padding-right: $spacer-value !important;
277287
padding-left: $spacer-value !important;
278288
}
279289
} @else {
280290
.p#{$spacing-side-value}-#{$spacer-key}\:sm,
281-
.p#{$spacing-side-value}-#{$spacer-key}\@sm {
291+
.p#{$spacing-side-value}-#{$spacer-key}\@sm,
292+
.p#{$spacing-side-value}-#{$spacer-key}-sm {
282293
padding-#{$spacing-side-key}: $spacer-value !important;
283294
}
284295
}
@@ -294,7 +305,8 @@
294305
@each $spacer-key, $spacer-value in $spacers {
295306
@if $spacing-side-key == 'horizontal' {
296307
.m#{$spacing-side-value}-#{$spacer-key}\:sm,
297-
.m#{$spacing-side-value}-#{$spacer-key}\@sm {
308+
.m#{$spacing-side-value}-#{$spacer-key}\@sm,
309+
.m#{$spacing-side-value}-#{$spacer-key}-sm {
298310
margin-right: $spacer-value !important;
299311
margin-left: $spacer-value !important;
300312
}

0 commit comments

Comments
 (0)