StaticApps/src/theme/components/_select.scss

88 lines
1.4 KiB
SCSS

$borderRadius: 4px;
v-select, v-options, v-option, v-label {
display: inline-block;
box-sizing: border-box;
}
v-select {
display: block;
position: relative;
margin-bottom: .5rem;
&:focus {
outline: none;
v-label {
border-color: rgba(0, 0, 0, .8);
}
}
}
v-label {
padding: .5rem 1rem;
background-color: rgba(0, 0, 0, .1);
border: 0.1rem solid rgba(0, 0, 0, .6);
color: $textColor;
cursor: pointer;
display: block;
position: relative;
margin-top: .5rem;
&:after {
content: '';
border: solid #fff;
border-width: 0 .1rem .1rem 0;
height: .5rem;
width: .5rem;
position: absolute;
right: 1.1em;
margin-top: .1rem;
transition: .3s;
transform: rotate(45deg);
}
&.open:after {
transform: rotate(-135deg);
margin-top: .4rem;
}
}
v-options {
position: absolute;
display: flex;
flex-direction: column;
overflow: hidden;
max-height: 0;
background-color: $bg;
z-index: 1000;
cursor: pointer;
color: $textColor;
box-shadow: $box-shadow-1;
width: 100%;
transition: max-height .3s;
}
v-option {
padding: .5rem 1rem .5rem .5rem;
position: relative;
&:not(:last-child) {
border-bottom: solid 1px #333;
}
}
v-option:not([disabled]):hover {
background-color: rgba(0, 0, 0, 0.3);
}
v-option[selected] {
background-color: $primary;
color: $textColor;
}
v-option[disabled] {
color: $textColorMoreLessBrightness;
}