浏览代码

Revert "feat: Add css-support for invalid form input elements"

This reverts commit b1aa84804b03e1d487cd3d2016ad92294397d830.
Johannes Schill 6 年之前
父节点
当前提交
b6305c2d80
共有 2 个文件被更改,包括 4 次插入15 次删除
  1. 1 5
      public/sass/components/_gf-form.scss
  2. 3 10
      public/sass/mixins/_forms.scss

+ 1 - 5
public/sass/components/_gf-form.scss

@@ -203,7 +203,7 @@ $input-border: 1px solid $input-border-color;
   }
 
   // Customize the `:focus` state to imitate native WebKit styles.
-  @include form-control-focus(false);
+  @include form-control-focus();
 
   // Placeholder
   &::placeholder {
@@ -251,10 +251,6 @@ $input-border: 1px solid $input-border-color;
   &--plaintext {
     white-space: unset;
   }
-
-  &--invalid {
-    @include form-control-focus(true);
-  }
 }
 
 .gf-form-hint {

+ 3 - 10
public/sass/mixins/_forms.scss

@@ -30,19 +30,12 @@
   }
 }
 
-@mixin form-control-focus($error) {
+@mixin form-control-focus() {
   &:focus {
-    $shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
-    0 0 5px $input-box-shadow-focus;
     border-color: $input-border-focus;
     outline: none;
-
-    @if $error == true {
-      border-color: $brand-warning;
-      $shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
-      0 0 5px $brand-warning;
-    }
-
+    $shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
+      0 0 5px $input-box-shadow-focus;
     @include box-shadow($shadow);
   }
 }