// Select default state body.ct-loading { select { border: 0; appearance: none; color: rgba(0, 0, 0, 0); height: var(--formInputHeight); } } // selectr begin .selectr-container { position: relative; } .selectr-container li { list-style: none; } .selectr-hidden { position: absolute; overflow: hidden; clip: rect(0px, 0px, 0px, 0px); width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0; border: 0 none; } .selectr-visible { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; z-index: 11; } .selectr-desktop.multiple .selectr-visible { display: none; } .selectr-desktop.multiple.native-open .selectr-visible { top: 100%; min-height: 200px !important; height: auto; opacity: 1; display: block; } .selectr-container.multiple.selectr-mobile .selectr-selected { z-index: 0; } .selectr-selected { display: flex; align-items: center; position: relative; z-index: 1; width: 100%; cursor: pointer; &:focus { outline: none; } } .selectr-label { display: none; overflow: hidden; width: 100%; white-space: nowrap; text-overflow: ellipsis; } .selectr-placeholder { color: rgba(44, 62, 80, 0.6); } .selectr-options-container { position: absolute; z-index: 20; top: calc(100% + 15px); left: 0; display: none; width: 100%; font-size: var(--formFontSize); color: var(--selectDropdownTextInitialColor); border-radius: 3px; overflow: hidden; background-color: var(--selectDropdownBackground); box-shadow: 0px 10px 30px 0px rgba(41, 51, 61, 0.1); } .selectr-container.open .selectr-options-container { display: flex; flex-direction: column; } .selectr-input-container { position: relative; display: none; } .selectr-clear, .selectr-input-clear { position: absolute; top: 50%; right: 22px; width: 20px; height: 20px; padding: 0; cursor: pointer; transform: translate3d(0px, -50%, 0px); border: medium none; background-color: transparent; z-index: 11; color: inherit; transition: opacity 0.1s ease; &:focus { outline: none; } &:not(:hover) { opacity: 0.7; } } .selectr-clear, .selectr-input-clear { display: none; } .selectr-container.has-selected .selectr-clear, .selectr-input-container.active .selectr-input-clear { display: block; } .selectr-clear::before, .selectr-clear::after, .selectr-input-clear::before, .selectr-input-clear::after { position: absolute; top: 5px; left: 9px; width: 2px; height: 10px; content: ' '; background-color: currentColor; } .selectr-clear:before, .selectr-input-clear::before { transform: rotate(45deg); } .selectr-clear:after, .selectr-input-clear::after { transform: rotate(-45deg); } .selectr-input-container.active, .selectr-input-container.active .selectr-clear { display: block; } .selectr-input { appearance: none; width: 100%; height: var(--formInputHeight); padding: 0 20px; border: none; font-size: inherit; color: inherit; background: transparent; border-bottom: 1px solid rgba(0, 0, 0, 0.07); &:focus { outline: none; } @include input-placeholder { opacity: 1; color: rgba(44, 62, 80, 0.6); } } .selectr-notice { display: none; width: 100%; height: var(--formInputHeight); padding: 0 20px; } .selectr-container.notice .selectr-notice { display: flex; align-items: center; } .selectr-options { position: relative; top: calc(100% + 2px); display: none; overflow-x: hidden; overflow-y: scroll; max-height: calc(var(--formInputHeight) * 7); margin: 0 !important; padding: 0 !important; } .selectr-container.open .selectr-options, .selectr-container.open .selectr-input-container, .selectr-container.notice .selectr-options-container { // display: block; display: flex; flex-direction: column; } .selectr-option { flex: 1 0 auto; display: flex; align-items: center; position: relative; min-height: var(--formInputHeight); padding: 5px 15px; cursor: pointer; font-weight: normal; line-height: 1.4; } .selectr-optgroup--label { display: flex; align-items: center; // height: var(--formInputHeight); padding: 0 15px; margin-top: 20px; margin-bottom: 8px; font-weight: 600; ~ .selectr-option { padding-left: 30px; } } .selectr-match { text-decoration: underline; } .selectr-option.selected { font-weight: 500; color: var(--selectDropdownTextActiveColor); background: var(--selectDropdownItemActiveColor); } .selectr-option.active:not(.selected) { color: var(--selectDropdownTextHoverColor); background: var(--selectDropdownItemHoverColor); } .selectr-option.disabled { opacity: 0.4; } .selectr-option.excluded { display: none; } .selectr-container.open .selectr-selected { // border-color: #999 #999 transparent #999; // border-radius: 3px 3px 0 0; } .selectr-container.open .selectr-selected::after { transform: rotate(180deg) translate3d(0px, 50%, 0px); } .selectr-disabled { opacity: .6; } .selectr-empty, .has-selected .selectr-placeholder { display: none; } .has-selected .selectr-label { display: block; } .selectr-input-container.loading::after { position: absolute; top: 50%; right: 20px; width: 20px; height: 20px; content: ''; transform: translate3d(0px, -50%, 0px); transform-origin: 50% 0 0; animation: 500ms linear 0s normal forwards infinite running spin; border-width: 3px; border-style: solid; border-color: #aaa #ddd #ddd; border-radius: 50%; } @keyframes spin { 0% { transform: rotate(0deg) translate3d(0px, -50%, 0px); } 100% { transform: rotate(360deg) translate3d(0px, -50%, 0px); } } .selectr-container.open.inverted .selectr-selected { // border-color: transparent #999 #999; // border-radius: 0 0 3px 3px; } .selectr-container.inverted .selectr-options-container { // box-shadow: 0px -10px 30px 0px rgba(41, 51, 61, 0.1); } .selectr-container.inverted .selectr-options-container { top: auto; bottom: calc(100% + 15px); .selectr-input-container { order: 5; .selectr-input { border-bottom: none; border-top: 1px solid rgba(0, 0, 0, 0.07); } } .selectr-notice { order: 2; } .selectr-options { order: 1; } } .selectr-container { @include input-placeholder { opacity: 1; color: rgba(44, 62, 80, 0.6); } } // select arrow .selectr-selected > i { position: absolute; z-index: 2; top: 0; right: 0; width: 40px; height: 100%; color: inherit; &:before, &:after { position: absolute; content: ''; top: 0; left: 0; right: 0; bottom: 0; width: 1.2px; height: 5px; margin: auto; background: currentColor; border-radius: 2px; transition: all 0.2s ease; } &:before { transform: translate(0px, 0) rotate(-45deg); } &:after { transform: translate(3px, 0) rotate(45deg); } } .selectr-container.open .selectr-selected > i { &:before { transform: translate(3px, 0) rotate(-45deg); } &:after { transform: translate(0px, 0) rotate(45deg); } }