Adding fields error state
This commit is contained in:
parent
6b684d46e2
commit
8ea6ac154f
@ -13,6 +13,7 @@
|
||||
|
||||
@import '../../cdb-variables/sizes';
|
||||
@import '../../cdb-variables/colors';
|
||||
@import '../../cdb-utilities/helpers';
|
||||
|
||||
.CDB-InputText {
|
||||
width: 100%;
|
||||
@ -34,8 +35,10 @@
|
||||
background: $cThirdBackground;
|
||||
}
|
||||
&.has-error {
|
||||
border: 1px solid rgba($cError, 0.48);
|
||||
background: rgba($cError, 0.04);
|
||||
color: $cError;
|
||||
@include default-form-error-style();
|
||||
}
|
||||
}
|
||||
|
||||
.CDB-FieldError .CDB-InputText {
|
||||
@include default-form-error-style();
|
||||
}
|
||||
|
@ -31,6 +31,7 @@
|
||||
|
||||
@import '../../cdb-variables/sizes';
|
||||
@import '../../cdb-variables/colors';
|
||||
@import '../../cdb-utilities/helpers';
|
||||
|
||||
.CDB-Select {
|
||||
position: relative;
|
||||
@ -64,8 +65,11 @@
|
||||
background: $cThirdBackground;
|
||||
}
|
||||
&.has-error {
|
||||
border: 1px solid rgba($cError, 0.48);
|
||||
background: rgba($cError, 0.04);
|
||||
color: $cError;
|
||||
@include default-form-error-style();
|
||||
}
|
||||
}
|
||||
|
||||
.CDB-FieldError .CDB-Select,
|
||||
.CDB-FieldError .CDB-SelectFake {
|
||||
@include default-form-error-style();
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
@import '../../cdb-variables/sizes';
|
||||
@import '../../cdb-variables/colors';
|
||||
@import '../../cdb-utilities/helpers';
|
||||
|
||||
.CDB-Textarea {
|
||||
width: 100%;
|
||||
@ -34,9 +35,10 @@
|
||||
border-color: $cSecondaryLine;
|
||||
background: $cThirdBackground;
|
||||
}
|
||||
&:has-error {
|
||||
@include default-form-error-style();
|
||||
}
|
||||
.CDB-Textarea.has-error {
|
||||
border: 1px solid rgba($cError, 0.48);
|
||||
background: rgba($cError, 0.04);
|
||||
color: $cError;
|
||||
}
|
||||
.CDB-FieldError .CDB-Textarea {
|
||||
@include default-form-error-style();
|
||||
}
|
||||
|
@ -93,3 +93,10 @@
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* helper mixins */
|
||||
@mixin default-form-error-style() {
|
||||
border: 1px solid rgba($cError, 0.48);
|
||||
background: rgba($cError, 0.04);
|
||||
color: $cError;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user