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

196 lines
3.6 KiB
SCSS

@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;
.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: 0px 4px 4px 0px;
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__option[role="treeitem"] {
background: $color-white;
line-height: 18px;
padding-left: 30px;
position: relative;
&::before {
position: absolute;
top: 0;
left: 0;
margin: 7px 0px 0px 12px;
font-family: "Font Awesome 5 Free";
content: "\f0c8";
font-weight: 400;
}
&.select2-results__option--highlighted {
background: inherit;
color: inherit;
}
&[aria-selected="true"] {
background: $color-concrete;
&::before {
content: "\f14a";
font-weight: 400;
}
}
&:hover {
background: $color-alto;
}
}
.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 {
position: absolute;
top: 0;
left: 0;
margin: 7px 0px 0px 12px;
font-family: "Font Awesome 5 Free";
content: "\f0c8";
font-weight: 400;
}
&:hover {
background: $color-alto;
}
}
&[data-toogle="all"] {
.select2-results__group {
background: $color-concrete;
&::before {
content: "\f14a";
font-weight: 400;
}
}
}
.select2-results__option[role="treeitem"] {
padding-left: 45px;
&::before {
left: 15px;
}
}
}
}
}
}
@media (min-width: 1200px) {
.select2-container--open.left-position {
top: 60px !important;
position: fixed !important;
z-index: 1500;
.select2-dropdown {
border-radius: 0px;
height: calc(100vh - 70px) !important;
width: 300px !important;
.select2-results {
height: calc(100% - 31px);
}
.select2-results__options {
max-height: 100%;
}
}
&.full {
.select2-results {
height: 100%;
}
}
}
}