Tune styles

This commit is contained in:
Valeryia Shyrko 2025-05-13 08:50:43 +02:00
commit 9bc9d1683c
3 changed files with 528 additions and 139 deletions

View file

@ -2,10 +2,10 @@
= Choices =
=============================== */
.choices {
position: relative;
overflow: hidden;
margin-bottom: 24px;
font-size: 16px;
margin-bottom: 24px;
overflow: hidden;
position: relative;
}
.choices:focus {
outline: none;
@ -37,26 +37,26 @@
padding-bottom: 7.5px;
}
.choices[data-type*=select-one] .choices__input {
display: block;
width: 100%;
padding: 10px;
border-bottom: 1px solid #ddd;
background-color: #fff;
border-bottom: 1px solid #ddd;
display: block;
margin: 0;
padding: 10px;
width: 100%;
}
.choices[data-type*=select-one] .choices__button {
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==");
padding: 0;
background-size: 8px;
position: absolute;
top: 50%;
right: 0;
margin-top: -10px;
margin-right: 25px;
height: 20px;
width: 20px;
border-radius: 10em;
height: 20px;
margin-right: 25px;
margin-top: -10px;
opacity: 0.25;
padding: 0;
position: absolute;
right: 0;
top: 50%;
width: 20px;
}
.choices[data-type*=select-one] .choices__button:hover, .choices[data-type*=select-one] .choices__button:focus {
opacity: 1;
@ -69,16 +69,16 @@
}
.choices[data-type*=select-one]::after {
content: "";
height: 0;
width: 0;
border-style: solid;
border-color: #333 transparent transparent transparent;
border-style: solid;
border-width: 5px;
height: 0;
margin-top: -2.5px;
pointer-events: none;
position: absolute;
right: 11.5px;
top: 50%;
margin-top: -2.5px;
pointer-events: none;
width: 0;
}
.choices[data-type*=select-one].is-open::after {
border-color: transparent transparent #333;
@ -101,20 +101,18 @@
}
.choices[data-type*=select-multiple] .choices__button,
.choices[data-type*=text] .choices__button {
position: relative;
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==");
background-size: 8px;
border-left: 1px solid rgb(0, 53.5897435897, 66);
display: inline-block;
margin-top: 0;
margin-right: -4px;
margin-bottom: 0;
margin-left: 8px;
padding-left: 16px;
border-left: 1px solid #003642;
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==");
background-size: 8px;
width: 8px;
line-height: 1;
position: relative;
opacity: 0.75;
border-radius: 0;
width: 8px;
}
.choices[data-type*=select-multiple] .choices__button:hover, .choices[data-type*=select-multiple] .choices__button:focus,
.choices[data-type*=text] .choices__button:hover,
@ -124,18 +122,18 @@
.choices__inner {
display: inline-block;
vertical-align: top;
width: 100%;
background-color: #f9f9f9;
padding: 7.5px 7.5px 3.75px;
border: 1px solid #ddd;
border-radius: 2.5px;
font-size: 14px;
min-height: 44px;
overflow: hidden;
padding: 7.5px 7.5px 3.75px;
vertical-align: top;
width: 100%;
}
.is-focused .choices__inner, .is-open .choices__inner {
border-color: #b7b7b7;
border-color: rgb(182.75, 182.75, 182.75);
}
.is-open .choices__inner {
border-radius: 2.5px 2.5px 0 0;
@ -166,19 +164,19 @@
display: inline;
}
.choices__list--multiple .choices__item {
display: inline-block;
vertical-align: middle;
background-color: #005F75;
border: 1px solid rgb(0, 74.2948717949, 91.5);
border-radius: 20px;
padding: 4px 10px;
box-sizing: border-box;
color: #fff;
display: inline-block;
font-size: 12px;
font-weight: 500;
margin-right: 3.75px;
margin-bottom: 3.75px;
background-color: #005F75;
border: 1px solid #004a5c;
color: #fff;
padding: 4px 10px;
word-break: break-all;
box-sizing: border-box;
vertical-align: middle;
}
.choices__list--multiple .choices__item[data-deletable] {
padding-right: 5px;
@ -188,52 +186,52 @@
margin-left: 3.75px;
}
.choices__list--multiple .choices__item.is-highlighted {
background-color: #004a5c;
border: 1px solid #003642;
background-color: rgb(0, 74.2948717949, 91.5);
border: 1px solid rgb(0, 53.5897435897, 66);
}
.is-disabled .choices__list--multiple .choices__item {
background-color: #aaaaaa;
border: 1px solid #919191;
background-color: rgb(170.25, 170.25, 170.25);
border: 1px solid rgb(144.75, 144.75, 144.75);
}
.choices__list--dropdown, .choices__list[aria-expanded] {
display: none;
z-index: 1;
position: absolute;
width: 100%;
background-color: #fff;
border: 1px solid #ddd;
top: 100%;
margin-top: -1px;
border-bottom-left-radius: 2.5px;
border-bottom-right-radius: 2.5px;
display: none;
margin-top: -1px;
overflow: hidden;
position: absolute;
top: 100%;
width: 100%;
word-break: break-all;
z-index: 1;
}
.is-active.choices__list--dropdown, .is-active.choices__list[aria-expanded] {
display: block;
}
.is-open .choices__list--dropdown, .is-open .choices__list[aria-expanded] {
border-color: #b7b7b7;
border-color: rgb(182.75, 182.75, 182.75);
}
.is-flipped .choices__list--dropdown, .is-flipped .choices__list[aria-expanded] {
top: auto;
border-radius: 0.25rem 0.25rem 0 0;
bottom: 100%;
margin-top: 0;
margin-bottom: -1px;
border-radius: 0.25rem 0.25rem 0 0;
top: auto;
}
.choices__list--dropdown .choices__list, .choices__list[aria-expanded] .choices__list {
position: relative;
max-height: 300px;
position: relative;
overflow: auto;
-webkit-overflow-scrolling: touch;
will-change: scroll-position;
}
.choices__list--dropdown .choices__item, .choices__list[aria-expanded] .choices__item {
position: relative;
padding: 10px;
font-size: 14px;
padding: 10px;
position: relative;
}
[dir=rtl] .choices__list--dropdown .choices__item, [dir=rtl] .choices__list[aria-expanded] .choices__item {
text-align: right;
@ -262,7 +260,7 @@
}
}
.choices__list--dropdown .choices__item--selectable.is-highlighted, .choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
background-color: #f2f2f2;
background-color: rgb(242.25, 242.25, 242.25);
}
.choices__list--dropdown .choices__item--selectable.is-highlighted::after, .choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after {
opacity: 0.5;
@ -278,42 +276,41 @@
.choices__item--disabled {
cursor: not-allowed;
opacity: 0.5;
-webkit-user-select: none;
user-select: none;
opacity: 0.5;
}
.choices__heading {
border-bottom: 1px solid rgb(246.5, 246.5, 246.5);
color: rgb(127.5, 127.5, 127.5);
font-weight: 600;
font-size: 12px;
padding: 10px;
border-bottom: 1px solid #f7f7f7;
color: gray;
}
.choices__button {
text-indent: -9999px;
appearance: none;
border: 0;
background-color: transparent;
background-repeat: no-repeat;
background-position: center;
border: 0;
cursor: pointer;
text-indent: -9999px;
}
.choices__button:focus {
outline: none;
}
.choices__input {
display: inline-block;
vertical-align: baseline;
background-color: #f9f9f9;
font-size: 14px;
margin-bottom: 5px;
border: 0;
border-radius: 0;
display: inline-block;
font-size: 14px;
margin-bottom: 0;
max-width: 100%;
padding: 4px 0 4px 2px;
vertical-align: baseline;
}
.choices__input:focus {
outline: 0;

378
src/styles/choices.css Normal file
View file

@ -0,0 +1,378 @@
/* stylelint-disable number-max-precision */
/* stylelint-disable rule-empty-line-before */
/* stylelint-disable no-descending-specificity */
/* stylelint-disable selector-class-pattern */
:root {
--choices-font-size-lg: 16px;
--choices-font-size-md: 14px;
--choices-font-size-sm: 12px;
--choices-guttering: 24px;
--choices-border-radius: 2.5px;
--choices-border-radius-item: 20px;
--choices-bg-color: #f9f9f9;
--choices-bg-color-disabled: #eaeaea;
--choices-bg-color-dropdown: #fff;
--choices-text-color: #333;
--choices-keyline-color: #ddd;
--choices-primary-color: #005F75;
--choices-disabled-color: #eaeaea;
--choices-highlight-color: var(--choices-primary-color);
--choices-button-dimension: 8px;
--choices-button-offset: 8px;
--choices-icon-cross: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==");
--choices-icon-cross-inverse: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==");
--choices-z-index: 1;
--choices-input-height: 44px;
--choices-width: 100%;
--choices-base-border: 1px solid var(--choices-keyline-color);
--choices-multiple-item-margin: 3.75px;
--choices-multiple-item-padding: 4px 10px;
--choices-dropdown-item-padding: 10px;
--choices-list-single-padding: 4px 16px 4px 4px;
--choices-input-padding: 4px 0 4px 2px;
--choices-inner-padding: 7.5px 7.5px 3.75px;
--choices-inner-one-padding: 7.5px;
--choices-arrow-size: 5px;
--choices-arrow-margin-top: -2.5px;
--choices-arrow-margin-top-open: -7.5px;
--choices-arrow-right: 11.5px;
--choices-button-opacity: 0.75;
--choices-button-opacity-hover: 1;
--choices-placeholder-opacity: 0.5;
}
/* ===============================
= Choices =
=============================== */
.choices {
font-size: var(--choices-font-size-lg);
margin-bottom: var(--choices-guttering);;
overflow: hidden;
position: relative;
}
.choices:focus {
outline: none;
}
.choices:last-child {
margin-bottom: 0;
}
.choices.is-open {
overflow: visible;
}
.choices.is-disabled .choices__inner,
.choices.is-disabled .choices__input {
background-color: var(--choices-bg-color-disabled);
cursor: not-allowed;
user-select: none;
}
.choices.is-disabled .choices__item {
cursor: not-allowed;
}
.choices [hidden] {
display: none !important;
}
.choices[data-type*="select-one"] {
cursor: pointer;
}
.choices[data-type*="select-one"] .choices__inner {
padding-bottom: var(--choices-inner-one-padding);
}
.choices[data-type*="select-one"] .choices__input {
background-color: var(--choices-bg-color-dropdown);
border-bottom: var(--choices-base-border);
display: block;
margin: 0;
padding: var(--choices-dropdown-item-padding);
width: var(--choices-width);
}
.choices[data-type*="select-one"] .choices__button {
background-image: var(--choices-icon-cross-inverse);
background-size: 8px;
border-radius: 10em;
height: 20px;
margin-right: 25px;
margin-top: -10px;
opacity: 0.25;
padding: 0;
position: absolute;
right: 0;
top: 50%;
width: 20px;
}
.choices[data-type*="select-one"] .choices__button:hover, .choices[data-type*="select-one"] .choices__button:focus {
opacity: var(--choices-button-opacity-hover);
}
.choices[data-type*="select-one"] .choices__button:focus {
box-shadow: 0 0 0 2px var(--choices-highlight-color);
}
.choices[data-type*="select-one"] .choices__item[data-placeholder] .choices__button {
display: none;
}
.choices[data-type*="select-one"]::after {
content: "";
border-color: var(--choices-text-color) transparent transparent;
border-style: solid;
border-width: var(--choices-arrow-size);
height: 0;
margin-top: var(--choices-arrow-margin-top);
pointer-events: none;
position: absolute;
right: var(--choices-arrow-right);
top: 50%;
width: 0;
}
.choices[data-type*="select-one"].is-open::after {
border-color: transparent transparent var(--choices-text-color);
margin-top: var(--choices-arrow-margin-top-open);
}
.choices[data-type*="select-one"][dir="rtl"]::after {
left: 11.5px;
right: auto;
}
.choices[data-type*="select-one"][dir="rtl"] .choices__button {
right: auto;
left: 0;
margin-left: 25px;
margin-right: 0;
}
.choices[data-type*="select-multiple"] .choices__inner,
.choices[data-type*="text"] .choices__inner {
cursor: text;
}
.choices[data-type*="select-multiple"] .choices__button,
.choices[data-type*="text"] .choices__button {
background-image: var(--choices-icon-cross);
background-size: var(--choices-button-dimension);
border-left: 1px solid rgb(0 53.5897435897 66);
display: inline-block;
margin-top: 0;
margin-right: var(-(--choices-button-offset) * 0.5);
margin-bottom: 0;
margin-left: var(--choices-button-offset);
padding-left: var(--choices-button-offset * 2);
position: relative;
opacity: var(--choices-button-opacity);
width: var(--choices-button-dimension);
}
.choices[data-type*="select-multiple"] .choices__button:hover, .choices[data-type*="select-multiple"] .choices__button:focus,
.choices[data-type*="text"] .choices__button:hover,
.choices[data-type*="text"] .choices__button:focus {
opacity: var(--choices-button-opacity-hover);
}
.choices__inner {
display: inline-block;
background-color: var(--choices-bg-color);
border: var(--choices-base-border);
border-radius:var(--choices-border-radius);
font-size: var(--choices-font-size-md);
min-height: var(--choices-input-height);
overflow: hidden;
padding: var(--choices-inner-padding);
vertical-align: top;
width: var(--choices-width);
}
.is-focused .choices__inner, .is-open .choices__inner {
border-color: rgb(182.75 182.75 182.75);
}
.is-open .choices__inner {
border-radius: var(--choices-border-radius) var(--choices-border-radius) 0 0;
}
.is-flipped.is-open .choices__inner {
border-radius: 0 0 var(--choices-border-radius) var(--choices-border-radius);
}
.choices__list {
margin: 0;
padding-left: 0;
list-style: none;
}
.choices__list--single {
display: inline-block;
padding: var(--choices-list-single-padding);
width: var(--choices-width);
}
[dir="rtl"] .choices__list--single {
padding-right: 4px;
padding-left: 16px;
}
.choices__list--single .choices__item {
width: var(--choices-width);
}
.choices__list--multiple {
display: inline;
}
.choices__list--multiple .choices__item {
background-color: var(--choices-primary-color);
border: 1px solid rgb(0 74.2948717949 91.5);
border-radius: var(--choices-border-radius-item);
box-sizing: border-box;
color: #fff;
display: inline-block;
font-size: var(--choices-font-size-sm);
font-weight: 500;
margin-right: var(--choices-multiple-item-margin);
margin-bottom: var(--choices-multiple-item-margin);
padding: var(--choices-multiple-item-padding);
word-break: break-all;
vertical-align: middle;
}
.choices__list--multiple .choices__item[data-deletable] {
padding-right: 5px;
}
[dir="rtl"] .choices__list--multiple .choices__item {
margin-right: 0;
margin-left: var(--choices-multiple-item-margin);
}
.choices__list--multiple .choices__item.is-highlighted {
background-color: rgb(0 74.2948717949 91.5);
border: 1px solid rgb(0 53.5897435897 66);
}
.is-disabled .choices__list--multiple .choices__item {
background-color: rgb(170.25 170.25 170.25);
border: 1px solid rgb(144.75 144.75 144.75);
}
.choices__list--dropdown, .choices__list[aria-expanded] {
background-color: var(--choices-bg-color-dropdown);
border: var(--choices-base-border);
border-bottom-left-radius: var(--choices-border-radius);
border-bottom-right-radius: var(--choices-border-radius);
display: none;
margin-top: -1px;
overflow: hidden;
position: absolute;
top: 100%;
width: var(--choices-width);
word-break: break-all;
z-index: var(--choices-z-index);
}
.is-active.choices__list--dropdown, .is-active.choices__list[aria-expanded] {
display: block;
}
.is-open .choices__list--dropdown, .is-open .choices__list[aria-expanded] {
border-color: rgb(182.75 182.75 182.75);
}
.is-flipped .choices__list--dropdown, .is-flipped .choices__list[aria-expanded] {
border-radius: 0.25rem 0.25rem 0 0;
bottom: 100%;
margin-top: 0;
margin-bottom: -1px;
top: auto;
}
.choices__list--dropdown .choices__list, .choices__list[aria-expanded] .choices__list {
max-height: 300px;
position: relative;
overflow: auto;
-webkit-overflow-scrolling: touch;
will-change: scroll-position;
}
.choices__list--dropdown .choices__item, .choices__list[aria-expanded] .choices__item {
font-size: var(--choices-font-size-md);
padding: var(--choices-dropdown-item-padding);
position: relative;
}
[dir="rtl"] .choices__list--dropdown .choices__item, [dir="rtl"] .choices__list[aria-expanded] .choices__item {
text-align: right;
}
@media (min-width: 640px) {
.choices__list--dropdown .choices__item--selectable[data-select-text], .choices__list[aria-expanded] .choices__item--selectable[data-select-text] {
padding-right: 100px;
}
.choices__list--dropdown .choices__item--selectable[data-select-text]::after, .choices__list[aria-expanded] .choices__item--selectable[data-select-text]::after {
content: attr(data-select-text);
font-size: var(--choices-font-size-sm);
opacity: 0;
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
}
[dir="rtl"] .choices__list--dropdown .choices__item--selectable[data-select-text], [dir="rtl"] .choices__list[aria-expanded] .choices__item--selectable[data-select-text] {
text-align: right;
padding-left: 100px;
padding-right: 10px;
}
[dir="rtl"] .choices__list--dropdown .choices__item--selectable[data-select-text]::after, [dir="rtl"] .choices__list[aria-expanded] .choices__item--selectable[data-select-text]::after {
right: auto;
left: 10px;
}
}
.choices__list--dropdown .choices__item--selectable.is-highlighted, .choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
background-color: rgb(242.25 242.25 242.25);
}
.choices__list--dropdown .choices__item--selectable.is-highlighted::after, .choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after {
opacity: 0.5;
}
.choices__item {
cursor: default;
}
.choices__item--selectable {
cursor: pointer;
}
.choices__item--disabled {
cursor: not-allowed;
opacity: 0.5;
user-select: none;
}
.choices__heading {
border-bottom: 1px solid rgb(246.5 246.5 246.5);
color: rgb(127.5 127.5 127.5);
font-weight: 600;
font-size: var(--choices-font-size-sm);
padding: 10px;
}
.choices__button {
appearance: none;
background-color: transparent;
background-repeat: no-repeat;
background-position: center;
border: 0;
cursor: pointer;
text-indent: -9999px;
}
.choices__button:focus {
outline: none;
}
.choices__input {
background-color: var(--choices-bg-color);
border: 0;
display: inline-block;
font-size: var(--choices-font-size-md);
margin-bottom: 0;
max-width: var(--choices-width);
padding: var(--choices-input-padding);
vertical-align: baseline;
}
.choices__input:focus {
outline: 0;
}
.choices__input::-webkit-search-decoration, .choices__input::-webkit-search-cancel-button, .choices__input::-webkit-search-results-button, .choices__input::-webkit-search-results-decoration {
display: none;
}
.choices__input::-ms-clear, .choices__input::-ms-reveal {
display: none;
width: 0;
height: 0;
}
[dir="rtl"] .choices__input {
padding-right: 2px;
padding-left: 0;
}
.choices__placeholder {
opacity: var(--choices-placeholder-opacity);
}
/* ===== End of Choices ====== */

View file

@ -24,12 +24,29 @@ $choices-button-offset: 8px !default;
$choices-icon-cross: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==") !default;
$choices-icon-cross-inverse: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==") !default;
$choices-z-index: 1 !default;
$choices-input-height: 44px !default;
$choices-width: 100% !default;
$choices-base-border: 1px solid $choices-keyline-color !default;
$choices-multiple-item-margin: 3.75px !default;
$choices-multiple-item-padding: 4px 10px !default;
$choices-dropdown-item-padding: 10px !default;
$choices-list-single-padding: 4px 16px 4px 4px !default;
$choices-input-padding: 4px 0 4px 2px !default;
$choices-inner-padding: 7.5px 7.5px 3.75px !default;
$choices-inner-one-padding: 7.5px !default;
$choices-arrow-size: 5px !default;
$choices-arrow-margin-top: -2.5px !default;
$choices-arrow-margin-top-open: -7.5px !default;
$choices-arrow-right: 11.5px !default;
$choices-button-opacity: 0.75 !default;
$choices-button-opacity-hover: 1 !default;
$choices-placeholder-opacity: 0.5 !default;
.#{$choices-selector} {
position: relative;
overflow: hidden;
margin-bottom: $choices-guttering;
font-size: $choices-font-size-lg;
margin-bottom: $choices-guttering;
overflow: hidden;
position: relative;
&:focus {
outline: none;
@ -63,33 +80,33 @@ $choices-z-index: 1 !default;
.#{$choices-selector}[data-type*='select-one'] {
cursor: pointer;
.#{$choices-selector}__inner {
padding-bottom: 7.5px;
padding-bottom: $choices-inner-one-padding;
}
.#{$choices-selector}__input {
background-color: $choices-bg-color-dropdown;
border-bottom: $choices-base-border;
display: block;
width: 100%;
padding: 10px;
border-bottom: 1px solid $choices-keyline-color;
background-color: #fff;
margin: 0;
padding: $choices-dropdown-item-padding;
width: $choices-width;
}
.#{$choices-selector}__button {
background-image: $choices-icon-cross-inverse;
padding: 0;
background-size: 8px;
position: absolute;
top: 50%;
right: 0;
margin-top: -10px;
margin-right: 25px;
height: 20px;
width: 20px;
border-radius: 10em;
height: 20px;
margin-right: 25px;
margin-top: -10px;
opacity: 0.25;
padding: 0;
position: absolute;
right: 0;
top: 50%;
width: 20px;
&:hover,
&:focus {
opacity: 1;
opacity: $choices-button-opacity-hover;
}
&:focus {
@ -102,21 +119,21 @@ $choices-z-index: 1 !default;
&::after {
content: "";
height: 0;
width: 0;
border-style: solid;
border-color: $choices-text-color transparent transparent transparent;
border-width: 5px;
position: absolute;
right: 11.5px;
top: 50%;
margin-top: -2.5px;
border-style: solid;
border-width: $choices-arrow-size;
height: 0;
margin-top: $choices-arrow-margin-top;
pointer-events: none;
position: absolute;
right: $choices-arrow-right;
top: 50%;
width: 0;
}
&.is-open::after {
border-color: transparent transparent $choices-text-color;
margin-top: -7.5px;
margin-top: $choices-arrow-margin-top-open;
}
&[dir="rtl"] {
@ -139,39 +156,37 @@ $choices-z-index: 1 !default;
cursor: text;
}
.#{$choices-selector}__button {
position: relative;
background-image: $choices-icon-cross;
background-size: $choices-button-dimension;
border-left: 1px solid color.adjust($choices-primary-color, $lightness: -10%);
display: inline-block;
margin-top: 0;
margin-right: -$choices-button-offset * 0.5;
margin-bottom: 0;
margin-left: $choices-button-offset;
padding-left: $choices-button-offset * 2;
border-left: 1px solid color.adjust($choices-primary-color, $lightness: -10%);
background-image: $choices-icon-cross;
background-size: $choices-button-dimension;
position: relative;
opacity: $choices-button-opacity;
width: $choices-button-dimension;
line-height: 1;
opacity: 0.75;
border-radius: 0;
&:hover,
&:focus {
opacity: 1;
opacity: $choices-button-opacity-hover;
}
}
}
.#{$choices-selector}__inner {
display: inline-block;
vertical-align: top;
width: 100%;
background-color: $choices-bg-color;
padding: 7.5px 7.5px 3.75px;
border: 1px solid $choices-keyline-color;
border: $choices-base-border;
border-radius: $choices-border-radius;
font-size: $choices-font-size-md;
min-height: 44px;
min-height: $choices-input-height;
overflow: hidden;
padding: $choices-inner-padding;
vertical-align: top;
width: $choices-width;
.is-focused &,
.is-open & {
@ -199,34 +214,34 @@ $choices-z-index: 1 !default;
.#{$choices-selector}__list--single {
display: inline-block;
padding: 4px 16px 4px 4px;
width: 100%;
padding: $choices-list-single-padding;
width: $choices-width;
[dir="rtl"] & {
padding-right: 4px;
padding-left: 16px;
}
.#{$choices-selector}__item {
width: 100%;
width: $choices-width;
}
}
.#{$choices-selector}__list--multiple {
display: inline;
.#{$choices-selector}__item {
display: inline-block;
vertical-align: middle;
border-radius: $choices-border-radius-item;
padding: 4px 10px;
font-size: $choices-font-size-sm;
font-weight: 500;
margin-right: 3.75px;
margin-bottom: 3.75px;
background-color: $choices-primary-color;
border: 1px solid color.adjust($choices-primary-color, $lightness: -5%);
color: #fff;
word-break: break-all;
border-radius: $choices-border-radius-item;
box-sizing: border-box;
color: #fff;
display: inline-block;
font-size: $choices-font-size-sm;
font-weight: 500;
margin-right: $choices-multiple-item-margin;
margin-bottom: $choices-multiple-item-margin;
padding: $choices-multiple-item-padding;
word-break: break-all;
vertical-align: middle;
&[data-deletable] {
padding-right: 5px;
@ -234,7 +249,7 @@ $choices-z-index: 1 !default;
[dir="rtl"] & {
margin-right: 0;
margin-left: 3.75px;
margin-left: $choices-multiple-item-margin;
}
&.is-highlighted {
@ -250,18 +265,18 @@ $choices-z-index: 1 !default;
}
%choices-dropdown {
display: none;
z-index: $choices-z-index;
position: absolute;
width: 100%;
background-color: $choices-bg-color-dropdown;
border: 1px solid $choices-keyline-color;
top: 100%;
margin-top: -1px;
border: $choices-base-border;
border-bottom-left-radius: $choices-border-radius;
border-bottom-right-radius: $choices-border-radius;
display: none;
margin-top: -1px;
overflow: hidden;
position: absolute;
top: 100%;
width: $choices-width;
word-break: break-all;
z-index: $choices-z-index;
&.is-active {
display: block;
@ -272,23 +287,23 @@ $choices-z-index: 1 !default;
}
.is-flipped & {
top: auto;
border-radius: 0.25rem 0.25rem 0 0;
bottom: 100%;
margin-top: 0;
margin-bottom: -1px;
border-radius: 0.25rem 0.25rem 0 0;
top: auto;
}
.#{$choices-selector}__list {
position: relative;
max-height: 300px;
position: relative;
overflow: auto;
-webkit-overflow-scrolling: touch;
will-change: scroll-position;
}
.#{$choices-selector}__item {
position: relative;
padding: 10px;
font-size: $choices-font-size-md;
padding: $choices-dropdown-item-padding;
position: relative;
[dir="rtl"] & {
text-align: right;
@ -346,26 +361,26 @@ $choices-z-index: 1 !default;
.#{$choices-selector}__item--disabled {
cursor: not-allowed;
user-select: none;
opacity: 0.5;
user-select: none;
}
.#{$choices-selector}__heading {
border-bottom: 1px solid color.adjust($choices-keyline-color, $lightness: 10%);
color: color.adjust(#333, $lightness: 30%);
font-weight: 600;
font-size: $choices-font-size-sm;
padding: 10px;
border-bottom: 1px solid color.adjust($choices-keyline-color, $lightness: 10%);
color: color.adjust(#333, $lightness: 30%);
}
.#{$choices-selector}__button {
text-indent: -9999px;
appearance: none;
border: 0;
background-color: transparent;
background-repeat: no-repeat;
background-position: center;
border: 0;
cursor: pointer;
text-indent: -9999px;
&:focus {
outline: none;
@ -373,15 +388,14 @@ $choices-z-index: 1 !default;
}
.#{$choices-selector}__input {
display: inline-block;
vertical-align: baseline;
background-color: $choices-bg-color;
font-size: $choices-font-size-md;
margin-bottom: 5px;
border: 0;
border-radius: 0;
max-width: 100%;
padding: 4px 0 4px 2px;
display: inline-block;
font-size: $choices-font-size-md;
margin-bottom: 0;
max-width: $choices-width;
padding: $choices-input-padding;
vertical-align: baseline;
&:focus {
outline: 0;
@ -408,7 +422,7 @@ $choices-z-index: 1 !default;
}
.#{$choices-selector}__placeholder {
opacity: 0.5;
opacity: $choices-placeholder-opacity;
}
/* ===== End of Choices ====== */