phpvms/resources/sass/admin/paper/_inputs.scss

259 lines
5.8 KiB
SCSS
Raw Normal View History

2018-04-10 04:16:01 +08:00
@include form-control-placeholder($medium-gray, 1);
2017-08-18 03:54:14 +08:00
.form-control {
2018-02-23 01:44:19 +08:00
font-family: "Avenir-light", "AvenirLTStd-Light", sans-serif !important;
2018-04-10 04:16:01 +08:00
border-radius: 0;
background-color: $transparent-bg;
border: 1px solid $light-gray;
color: $black-color;
line-height: 1em;
font-size: $font-size-base;
font-weight: 400;
2018-04-10 04:16:01 +08:00
@include transition-input-focus-color();
@include box-shadow(none);
.has-success & {
border-color: $light-gray;
}
&:focus {
border: 1px solid $brand-primary;
@include box-shadow(none);
outline: 0 !important;
color: $black-color;
& + .input-group-addon,
& ~ .input-group-addon {
border: 1px solid $brand-primary;
background-color: $transparent-bg;
}
2017-08-18 03:54:14 +08:00
}
2017-12-04 05:29:34 +08:00
2017-08-18 03:54:14 +08:00
.has-success &,
.has-error &,
.has-success &:focus,
2018-04-10 04:16:01 +08:00
.has-error &:focus {
2017-08-18 03:54:14 +08:00
@include box-shadow(none);
}
2017-12-04 05:29:34 +08:00
2018-04-10 04:16:01 +08:00
.has-danger &,
.has-success & {
&.form-control-success,
&.form-control-danger {
background-image: none;
2017-08-18 07:26:48 +08:00
}
2017-08-18 03:54:14 +08:00
}
2018-04-10 04:16:01 +08:00
.has-danger & {
background-color: lighten($danger-color, 30%);
border-color: lighten($danger-color, 30%);
2017-08-18 03:54:14 +08:00
color: $danger-color;
2018-04-10 04:16:01 +08:00
&:focus {
background-color: $opacity-gray-3;
2017-08-18 07:26:48 +08:00
}
2017-08-18 03:54:14 +08:00
}
2017-12-04 05:29:34 +08:00
2018-04-10 04:16:01 +08:00
& + .form-control-feedback {
border-radius: $border-radius-extra-small;
2017-08-18 03:54:14 +08:00
font-size: $font-size-base;
margin-top: -7px;
position: absolute;
right: 10px;
top: 50%;
vertical-align: middle;
}
2018-04-10 04:16:01 +08:00
.open & {
border-radius: $border-radius-extra-small $border-radius-extra-small 0 0;
2017-08-18 03:54:14 +08:00
border-bottom-color: transparent;
}
2018-04-10 04:16:01 +08:00
& + .input-group-addon {
background-color: $white-bg;
}
2017-08-18 03:54:14 +08:00
}
2018-04-10 04:16:01 +08:00
.has-success,
.has-danger {
&:after {
font-family: 'Nucleo Outline';
content: "\ea22";
display: inline-block;
position: absolute;
right: 35px;
top: 12px;
color: $success-color;
font-size: 11px;
}
&.input-lg {
&:after {
font-size: 13px;
top: 13px;
}
}
2017-08-18 03:54:14 +08:00
}
2018-04-10 04:16:01 +08:00
.has-danger {
&:after {
content: "\ea53";
2017-08-18 03:54:14 +08:00
color: $danger-color;
}
}
2018-04-10 04:16:01 +08:00
@include input-sm-padding($padding-small-vertical, $padding-small-horizontal);
@include input-lg-padding($padding-large-vertical, $padding-input-horizontal);
@include input-base-padding($padding-small-vertical, $padding-small-horizontal);
.form-group.form-group-no-border,
.input-group.form-group-no-border {
.form-control,
.form-control + .input-group-addon {
background-color: $opacity-gray-3;
border: medium none;
&:focus,
&:active,
&:active {
border: medium none;
background-color: $opacity-gray-5;
}
}
.form-control {
&:focus {
& + .input-group-addon {
background-color: $opacity-gray-5;
}
}
}
.input-group-addon {
background-color: $opacity-gray-3;
border: none;
2017-08-18 03:54:14 +08:00
}
}
2018-04-10 04:16:01 +08:00
.has-error {
.form-control-feedback, .control-label {
color: $danger-color;
}
}
.has-success {
.form-control-feedback, .control-label {
color: $success-color;
}
}
2017-08-18 03:54:14 +08:00
.input-group-addon {
2018-04-10 04:16:01 +08:00
background-color: $white-bg;
border: 1px solid $light-gray;
border-radius: $border-radius-extra-small;
color: $dark-background;
padding: $padding-base-vertical - 1 0 $padding-base-vertical - 1 $padding-base-horizontal - 1;
@include transition-input-focus-color();
2017-12-04 05:29:34 +08:00
2017-08-18 03:54:14 +08:00
.has-success &,
2018-04-10 04:16:01 +08:00
.has-danger & {
2017-08-18 03:54:14 +08:00
background-color: $white-color;
}
2018-04-10 04:16:01 +08:00
.has-danger .form-control:focus + & {
2017-08-18 03:54:14 +08:00
color: $danger-color;
}
2018-04-10 04:16:01 +08:00
.has-success .form-control:focus + & {
2017-08-18 03:54:14 +08:00
color: $success-color;
}
2018-04-10 04:16:01 +08:00
& + .form-control,
& ~ .form-control {
@include input-size($padding-base-vertical - 1, $padding-base-horizontal);
padding-left: 18px;
2017-08-18 03:54:14 +08:00
}
}
2018-04-10 04:16:01 +08:00
.input-group-focus {
.input-group-addon {
background-color: $white-bg;
border-color: $primary-color;
}
&.form-group-no-border {
.input-group-addon {
background-color: $opacity-gray-5;
}
2017-08-18 07:26:48 +08:00
}
}
2018-04-10 04:16:01 +08:00
.input-group,
.form-group {
margin-bottom: 10px;
2017-08-18 07:26:48 +08:00
}
2018-04-10 04:16:01 +08:00
.input-group[disabled] {
.input-group-addon {
2017-08-18 07:26:48 +08:00
background-color: $light-gray;
}
}
2018-04-10 04:16:01 +08:00
/*.input-group .form-control:first-child,
2017-12-04 05:29:34 +08:00
.input-group-addon:first-child,
.input-group-btn:first-child > .dropdown-toggle,
2017-08-18 03:54:14 +08:00
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) {
border-right: 0 none;
}
2017-12-04 05:29:34 +08:00
.input-group .form-control:last-child,
.input-group-addon:last-child,
.input-group-btn:last-child > .dropdown-toggle,
2017-08-18 03:54:14 +08:00
.input-group-btn:first-child > .btn:not(:first-child) {
border-left: 0 none;
2018-04-10 04:16:01 +08:00
}*/
2017-08-18 03:54:14 +08:00
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
2017-08-18 07:26:48 +08:00
background-color: $light-gray;
2018-04-10 04:16:01 +08:00
color: $default-color;
2017-08-18 03:54:14 +08:00
cursor: not-allowed;
}
2018-04-10 04:16:01 +08:00
.input-group-btn .btn {
2017-08-18 03:54:14 +08:00
border-width: $border-thin;
2018-04-10 04:16:01 +08:00
padding: $padding-btn-vertical $padding-base-horizontal;
2017-08-18 03:54:14 +08:00
}
2018-04-10 04:16:01 +08:00
.input-group-btn .btn-default:not(.btn-fill) {
2017-08-18 03:54:14 +08:00
border-color: $medium-gray;
}
2018-04-10 04:16:01 +08:00
.input-group-btn:last-child > .btn {
2017-08-18 03:54:14 +08:00
margin-left: 0;
}
2018-04-10 04:16:01 +08:00
textarea.form-control {
2017-08-18 07:26:48 +08:00
max-width: 100%;
padding: 10px 10px;
2017-08-18 07:26:48 +08:00
resize: none;
2018-04-10 04:16:01 +08:00
background-color: $transparent-bg;
border: 1px solid $light-gray;
color: $black-color;
line-height: 1em;
font-size: $font-size-base;
font-weight: 400;
2018-04-10 04:16:01 +08:00
border-radius: 0;
&:focus,
&:active {
@include box-shadow(none);
border: 1px solid $brand-primary;
background-color: $transparent-bg;
}
2017-08-18 03:54:14 +08:00
}
2017-08-18 07:26:48 +08:00
2018-04-10 04:16:01 +08:00
.has-success,
.has-danger {
&.form-group .form-control,
&.form-group.form-group-no-border .form-control {
padding-right: $padding-input-horizontal + 21;
}
}