0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-30 22:52:24 +01:00

🐛 Enable 0.x with negative margins @ v4 (#33593)

* 🐛 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: `<img class="mt-n0.5">`

* 💚 Clear CI errors
This commit is contained in:
k-utsumi 2021-06-24 16:57:47 +09:00 committed by GitHub
parent 538ea32cb7
commit 086c0bfc25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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} {