MyCrypto/common/sass/styles/overrides/forms.scss

83 lines
1.4 KiB
SCSS

// Form overrides
@import 'common/sass/variables';
label {
margin-bottom: $space-xs;
font-size: $font-size-bump-more;
&.is-required:after {
content: '*';
padding-left: 2px;
color: $brand-warning;
}
}
label + .form-control,
label + input,
label + textarea {
margin-top: 0;
}
input[type='radio'],
input[type='checkbox'] {
margin: 3px 0 0;
line-height: normal;
}
input[readonly] {
background-color: #fafafa;
cursor: text !important;
}
.form-control {
margin-top: $space-sm;
margin-bottom: $space-sm;
transition: $transition;
&:focus {
border-color: $input-border-focus;
outline: 0;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
0 0 1px rgba($brand-primary, 0.5);
}
}
.form-group {
display: block;
margin-top: $form-group-margin-bottom * 2;
margin-bottom: $form-group-margin-bottom;
}
.radio,
.checkbox {
margin: 15px 0;
font-weight: 500;
}
// Custom feedback classes
@mixin form-control-state($color) {
border-color: lighten($color, 20%);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075)
0 0 1px rgba($color, 0.1);
&:focus {
border-color: lighten($color, 5%);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.125),
0 0 1px rgba($color, 0.5);
}
}
.form-control {
&.is-valid {
@include form-control-state($brand-success);
}
&.is-invalid {
@include form-control-state($brand-danger);
}
&.is-semivalid {
@include form-control-state($brand-warning);
}
}