amis/scss/components/_result-box.scss

113 lines
2.1 KiB
SCSS
Raw Normal View History

2020-05-14 20:47:05 +08:00
.#{$ns}ResultBox {
@include input-input();
flex-wrap: wrap;
padding: 0 3px;
min-height: $Form-input-height;
align-items: center;
&.is-error {
border-color: $Form-input-onError-borderColor;
background-color: $Form-input-onError-bg;
}
&.is-focused {
border-color: $Form-input-onFocused-borderColor;
box-shadow: $Form-input-boxShadow;
@if $Form-input-onFocused-bg !=$Form-input-bg {
background-color: $Form-input-onFocused-bg;
}
}
&.is-error.is-focused {
border-color: $Form-input-onError-borderColor;
}
&.is-disabled {
color: $text--muted-color;
background: $Form-input-onDisabled-bg;
border-color: $Form-input-onDisabled-borderColor;
}
&-clear {
@include input-clear();
2020-05-15 16:47:08 +08:00
width: px2rem(26px);
height: px2rem(26px);
margin: 0 px2rem(-2px);
&:hover {
background: $ResultBox-value-bg;
}
> svg {
width: px2rem(12px);
height: px2rem(12px);
}
2020-05-14 20:47:05 +08:00
}
> svg {
display: inline-block;
2020-05-15 16:47:08 +08:00
width: px2rem(14px);
2020-05-14 20:47:05 +08:00
color: $icon-color;
}
> a {
cursor: pointer;
}
&-mid {
flex-grow: 1;
}
&-value {
background: $ResultBox-value-bg;
color: $ResultBox-value-color;
font-size: $Form-input-fontSize;
2020-05-15 16:47:08 +08:00
padding: 0 px2rem(5px);
min-height: px2rem(24px);
2020-05-14 20:47:05 +08:00
flex-wrap: nowrap;
display: inline-flex;
align-items: center;
margin: 2px 3px;
user-select: none;
> a {
cursor: pointer;
2020-05-15 16:47:08 +08:00
margin-left: px2rem(5px);
2020-05-14 20:47:05 +08:00
color: $ResultBox-icon-color;
&:hover {
color: $ResultBox-icon--onHover-color;
}
2020-05-15 16:47:08 +08:00
> svg {
width: px2rem(10px);
height: px2rem(10px);
}
2020-05-14 20:47:05 +08:00
}
&:hover {
background: $ResultBox-value--onHover-bg;
}
&.is-disabled {
pointer-events: none;
color: $ResultBox-value--onDisabled-color;
> a {
color: $ResultBox-icon--onDisabled-color;
}
}
}
&-placeholder {
color: $Form-input-placeholderColor;
user-select: none;
margin-left: 8px;
}
> input {
padding-left: 8px;
min-height: 24px;
}
}