From 086c0bfc25cc1dcd1365f192453992e9188876b8 Mon Sep 17 00:00:00 2001 From: k-utsumi Date: Thu, 24 Jun 2021 16:57:47 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Enable=20`0.x`=20with=20negative?= =?UTF-8?q?=20margins=20@=20v4=20(#33593)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 Enable `0.x` with negative margins @ v4 I set it as below, but no negative margin was added. `$spacers: (0\.5: ($spacer * .125));` After investigating, it seems that `0 \ .5` is also evaluated as 0. So I changed it to string comparison. HTML example: `` * 💚 Clear CI errors --- scss/utilities/_spacing.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scss/utilities/_spacing.scss b/scss/utilities/_spacing.scss index 351136790a..3e98581a94 100644 --- a/scss/utilities/_spacing.scss +++ b/scss/utilities/_spacing.scss @@ -30,7 +30,7 @@ // Negative margins (e.g., where `.mb-n1` is negative version of `.mb-1`) @each $size, $length in $spacers { - @if $size != 0 { + @if "#{$size}" != "0" { .m#{$infix}-n#{$size} { margin: -$length !important; } .mt#{$infix}-n#{$size}, .my#{$infix}-n#{$size} {