static/js/com/dropdown/styles.scss (68 lines of code) (raw):
$color-grey: #ededed;
$padding-h: 5px;
$select-value-arrow-space: 15px + $padding-h;
$bg-color: #fff;
$border-color: #c5c5c5;
$border-radius: 3px;
$color-blue: #416ea4;
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-selected-value {
position: relative;
min-width: 30px;
border: 1px solid $border-color;
border-radius: $border-radius;
padding: 0 $select-value-arrow-space 0 $padding-h;
background-color: $bg-color;
user-select: none;
cursor: pointer;
&:hover {
color: $color-blue;
}
&:after {
position: absolute;
top: 7px;
right: 5px;
width: 0;
height: 0;
border-style: solid;
border-width: 4px 4px 0 4px;
border-color: #000000 transparent transparent transparent;
content: '';
}
&:hover:after {
border-top-color: $color-blue;
}
.dropdown._opened &:after {
transform: rotate(180deg);
}
}
.dropdown-items {
position: absolute;
z-index: 1;
top: 100%;
left: 0;
box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.3);
min-width: 100%;
background-color: $bg-color;
display: none;
.dropdown._opened & {
display: block;
}
}
.dropdown-item {
overflow: hidden;
padding: 1px $select-value-arrow-space 0 $padding-h;
white-space: nowrap;
text-overflow: ellipsis;
cursor: pointer;
&:hover {
background-color: $color-grey;
}
&._selected {
font-weight: bold;
cursor: default;
}
}