mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 22:25:30 +08:00
f684ddd365
* Change dropdown highlight color and fix task tag position
249 lines
4.6 KiB
SCSS
249 lines
4.6 KiB
SCSS
// scss-lint:disable SelectorDepth
|
|
// scss-lint:disable NestingDepth
|
|
// scss-lint:disable SelectorFormat
|
|
// scss-lint:disable ImportantRule
|
|
|
|
@import "constants";
|
|
@import "mixins";
|
|
|
|
.select2-container {
|
|
|
|
.select2-selection {
|
|
max-height: 23px;
|
|
overflow: hidden;
|
|
position: relative;
|
|
|
|
&.select2-selection--multiple {
|
|
border: 1px solid $color-alto;
|
|
}
|
|
|
|
.select2-selection__rendered {
|
|
width: calc(100% - 26px);
|
|
}
|
|
|
|
.select2-search__field {
|
|
|
|
&::placeholder {
|
|
color: $color-silver-chalice;
|
|
}
|
|
}
|
|
|
|
.select2-selection__choice {
|
|
background: $color-concrete;
|
|
border: 1px solid $color-alto;
|
|
padding-bottom: 2px;
|
|
|
|
.select2-selection__choice__remove {
|
|
float: right;
|
|
margin: 0;
|
|
margin-left: 5px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.select2-arrow {
|
|
align-items: center;
|
|
background: $color-white;
|
|
border: 1px solid $color-alto;
|
|
border-radius: 0 4px 4px 0;
|
|
cursor: pointer;
|
|
display: flex;
|
|
height: 100%;
|
|
justify-content: center;
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
width: 26px;
|
|
|
|
&:hover {
|
|
background: $color-gainsboro;
|
|
border: 1px solid $color-silver-chalice;
|
|
}
|
|
|
|
.caret {
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
.select2-dropdown {
|
|
border: 1px solid $color-alto;
|
|
z-index: 1500;
|
|
|
|
.select2_select_all {
|
|
border: 0;
|
|
border-bottom: 1px solid $color-alto;
|
|
border-radius: 0;
|
|
cursor: pointer;
|
|
line-height: 20px;
|
|
padding: 5px;
|
|
text-align: center;
|
|
width: 100%;
|
|
}
|
|
|
|
.select2-results__options {
|
|
position: relative;
|
|
}
|
|
|
|
.select2-results__option[role="treeitem"] {
|
|
background: $color-white;
|
|
line-height: 18px;
|
|
padding-left: 30px;
|
|
position: relative;
|
|
|
|
&::before {
|
|
content: "\f0c8";
|
|
font-family: "Font Awesome 5 Free";
|
|
font-weight: 400;
|
|
left: 0;
|
|
margin: 7px 0 0 12px;
|
|
position: absolute;
|
|
top: 0;
|
|
}
|
|
|
|
&.select2-results__option--highlighted {
|
|
background: inherit;
|
|
color: inherit;
|
|
}
|
|
|
|
&[aria-selected="true"] {
|
|
background: $color-concrete;
|
|
|
|
&::before {
|
|
content: "\f14a";
|
|
font-weight: 400;
|
|
}
|
|
}
|
|
|
|
&.arrow_pointer {
|
|
background: $brand-primary;
|
|
color: $color-white;
|
|
}
|
|
|
|
&:hover {
|
|
background: $brand-primary;
|
|
color: $color-white;
|
|
}
|
|
|
|
&.loading-results {
|
|
background: $color-white;
|
|
border-bottom: 1px solid $color-alto;
|
|
padding-left: 10px;
|
|
position: absolute;
|
|
top: 0;
|
|
width: 100%;
|
|
|
|
&::before {
|
|
content: "";
|
|
}
|
|
}
|
|
}
|
|
|
|
.select2-results__option[role="group"] {
|
|
|
|
strong {
|
|
font-size: $font-size-base;
|
|
}
|
|
}
|
|
|
|
&.custom-group {
|
|
.select2-results__option[role="group"] {
|
|
|
|
.select2-results__group {
|
|
cursor: pointer;
|
|
padding-left: 30px;
|
|
position: relative;
|
|
|
|
&::before {
|
|
content: "\f0c8";
|
|
font-family: "Font Awesome 5 Free";
|
|
font-weight: 400;
|
|
left: 0;
|
|
margin: 7px 0 0 12px;
|
|
position: absolute;
|
|
top: 0;
|
|
}
|
|
|
|
&:hover {
|
|
background: $color-alto;
|
|
}
|
|
}
|
|
|
|
&[data-toogle="all"] {
|
|
|
|
.select2-results__group {
|
|
background: $color-concrete;
|
|
|
|
&::before {
|
|
content: "\f14a";
|
|
font-weight: 400;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.arrow_pointer {
|
|
|
|
.select2-results__group {
|
|
background: $color-alto;
|
|
}
|
|
}
|
|
|
|
.select2-results__option[role="treeitem"] {
|
|
padding-left: 45px;
|
|
|
|
&::before {
|
|
left: 15px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&.select2-container--disabled {
|
|
cursor: pointer;
|
|
|
|
.select2-selection {
|
|
background: transparent;
|
|
border: 1px solid transparent;
|
|
cursor: pointer;
|
|
|
|
&:hover {
|
|
border: 1px solid $color-gainsboro;
|
|
}
|
|
|
|
.select2-selection__choice {
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@media (min-width: 1200px) {
|
|
|
|
.select2-container--open.left-position {
|
|
position: fixed !important;
|
|
top: 60px !important;
|
|
z-index: 1500;
|
|
|
|
.select2-dropdown {
|
|
border-radius: 0;
|
|
height: calc(100vh - 70px) !important;
|
|
width: 300px !important;
|
|
|
|
.select2-results {
|
|
height: calc(100% - 31px);
|
|
}
|
|
|
|
.select2-results__options {
|
|
max-height: 100%;
|
|
position: relative;
|
|
}
|
|
}
|
|
|
|
&.full {
|
|
|
|
.select2-results {
|
|
height: 100%;
|
|
}
|
|
}
|
|
}
|
|
}
|