Skip to content

Commit ef7659f

Browse files
committed
Don't output -n0, and top-0, right-0, bottom-0, and left-0
1 parent 0fb71d1 commit ef7659f

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/marketing/utilities/layout.scss

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@
66
@each $breakpoint, $variant in $marketing-position-variants {
77
@include breakpoint($breakpoint) {
88
@each $scale, $size in $marketing-all-spacers {
9-
.top#{$variant}-#{$scale} { top: $size !important; }
10-
.right#{$variant}-#{$scale} { right: $size !important; }
11-
.bottom#{$variant}-#{$scale} { bottom: $size !important; }
12-
.left#{$variant}-#{$scale} { left: $size !important; }
9+
@if ($size != 0 or $variant != "") {
10+
.top#{$variant}-#{$scale} { top: $size !important; }
11+
.right#{$variant}-#{$scale} { right: $size !important; }
12+
.bottom#{$variant}-#{$scale} { bottom: $size !important; }
13+
.left#{$variant}-#{$scale} { left: $size !important; }
14+
}
1315

14-
.top#{$variant}-n#{$scale} { top: -$size !important; }
15-
.right#{$variant}-n#{$scale} { right: -$size !important; }
16-
.bottom#{$variant}-n#{$scale} { bottom: -$size !important; }
17-
.left#{$variant}-n#{$scale} { left: -$size !important; }
16+
@if ($size != 0) {
17+
.top#{$variant}-n#{$scale} { top: -$size !important; }
18+
.right#{$variant}-n#{$scale} { right: -$size !important; }
19+
.bottom#{$variant}-n#{$scale} { bottom: -$size !important; }
20+
.left#{$variant}-n#{$scale} { left: -$size !important; }
21+
}
1822
}
1923
}
2024
}

0 commit comments

Comments
 (0)