From 5d39e36083b5c193d7599c7a6897cd171fc36c19 Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Sat, 17 Aug 2019 15:12:08 +0200 Subject: [PATCH] Don't bind validation to form controls --- scss/mixins/_forms.scss | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) diff --git a/scss/mixins/_forms.scss b/scss/mixins/_forms.scss index c185f79739..dac843f2ee 100644 --- a/scss/mixins/_forms.scss +++ b/scss/mixins/_forms.scss @@ -63,6 +63,13 @@ @include border-radius($form-feedback-tooltip-border-radius); } + @include form-validation-state-selector($state) { + ~ .#{$state}-feedback, + ~ .#{$state}-tooltip { + display: block; + } + } + .form-control { @include form-validation-state-selector($state) { border-color: $color; @@ -79,11 +86,6 @@ border-color: $color; box-shadow: 0 0 0 $input-focus-width rgba($color, .25); } - - ~ .#{$state}-feedback, - ~ .#{$state}-tooltip { - display: block; - } } } @@ -110,21 +112,6 @@ border-color: $color; box-shadow: 0 0 0 $input-focus-width rgba($color, .25); } - - ~ .#{$state}-feedback, - ~ .#{$state}-tooltip { - display: block; - } - } - } - - - .form-control-file { - @include form-validation-state-selector($state) { - ~ .#{$state}-feedback, - ~ .#{$state}-tooltip { - display: block; - } } } @@ -151,11 +138,6 @@ } } - ~ .#{$state}-feedback, - ~ .#{$state}-tooltip { - display: block; - } - &:checked { ~ .custom-control-label::before { border-color: lighten($color, 10%); @@ -182,11 +164,6 @@ border-color: $color; } - ~ .#{$state}-feedback, - ~ .#{$state}-tooltip { - display: block; - } - &:focus { ~ .custom-file-label { border-color: $color;