diff options
| author | Martijn Cuppens <[email protected]> | 2019-10-12 15:07:22 +0200 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2019-10-14 12:12:05 +0300 |
| commit | 327bfca418eb586e488e021ba2ba94074b2fc1c5 (patch) | |
| tree | 9825ff6392486eca1a03e6440d6cd6aeced566c5 | |
| parent | be452a0ed3008f07a0aaf2bfffaaa13a8014e926 (diff) | |
| download | bootstrap-327bfca418eb586e488e021ba2ba94074b2fc1c5.tar.xz bootstrap-327bfca418eb586e488e021ba2ba94074b2fc1c5.zip | |
Fix top level ampersand (#29518)
Fixes dart sass compatibility.
| -rw-r--r-- | scss/mixins/_forms.scss | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scss/mixins/_forms.scss b/scss/mixins/_forms.scss index dac843f2e..d542df901 100644 --- a/scss/mixins/_forms.scss +++ b/scss/mixins/_forms.scss @@ -26,14 +26,16 @@ @include deprecate("The `form-control-focus()` mixin", "v4.3.2", "v5", $ignore-warning); } +// This mixin uses an `if()` technique to be compatible with Dart Sass +// See https://github.com/sass/sass/issues/1873#issuecomment-152293725 for more details @mixin form-validation-state-selector($state) { @if ($state == "valid" or $state == "invalid") { - .was-validated &:#{$state}, - &.is-#{$state} { + .was-validated #{if(&, "&", "")}:#{$state}, + #{if(&, "&", "")}.is-#{$state} { @content; } } @else { - &.is-#{$state} { + #{if(&, "&", "")}.is-#{$state} { @content; } } |
