scinote-web/app/assets/stylesheets/select2_customizations.scss

243 lines
4.5 KiB
SCSS
Raw Normal View History

// 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);
}
2019-03-27 18:19:58 +08:00
.select2-search__field {
2019-03-27 21:39:29 +08:00
&::placeholder {
2019-03-27 21:39:29 +08:00
color: $color-silver-chalice;
}
2019-03-27 18:19:58 +08:00
}
.select2-selection__choice {
background: $color-concrete;
border: 1px solid $color-alto;
.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: $color-alto;
}
&:hover {
background: $color-alto;
}
&.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;
}
}
}
}
}
2019-04-23 17:11:22 +08:00
&.select2-container--disabled{
cursor:pointer;
.select2-selection{
border:1px solid transparent;
background: transparent;
cursor:pointer;
&:hover{
border:1px solid $color-gainsboro;
}
.select2-selection__choice {
cursor:pointer;
}
}
}
}
2019-03-25 20:56:32 +08:00
@media (min-width: 1200px) {
.select2-container--open.left-position {
position: fixed !important;
top: 60px !important;
z-index: 1500;
2019-03-25 20:56:32 +08:00
.select2-dropdown {
border-radius: 0;
2019-03-25 20:56:32 +08:00
height: calc(100vh - 70px) !important;
width: 300px !important;
.select2-results {
height: calc(100% - 31px);
}
.select2-results__options {
max-height: 100%;
position: relative;
2019-03-25 20:56:32 +08:00
}
}
&.full {
.select2-results {
height: 100%;
}
}
2019-03-25 20:56:32 +08:00
}
}