@ohu-mobile/core
Version:
130 lines • 2.78 kB
CSS
.ohu-select {
display: inline-flex;
position: relative;
}
.ohu-select__popup {
width: 100%;
background: #FFF;
box-sizing: border-box;
padding-bottom: constant(safe-area-inset-bottom); /* iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom); /* iOS >= 11.2 */
}
.ohu-select__popup__content {
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
max-height: calc(100% - 90px);
}
.ohu-select__popup .ohu-popup-header {
background: #FFF;
}
.ohu-select__popup .ohu-popup-header__text {
color: #333;
}
.ohu-select.is-disabled .ohu-select__input, .ohu-select.is-disabled select {
opacity: 0.5;
cursor: not-allowed;
}
.ohu-select__input {
width: 100%;
box-sizing: border-box;
font-size: 32px;
font-weight: normal;
line-height: 1.375em;
border: 0;
display: inline-flex;
align-items: center;
cursor: pointer;
}
.ohu-select__input.is-normal {
padding: 20px 20px 20px 26px;
}
.ohu-select__input.is-outline {
padding: 20px 16px;
}
.ohu-select__input.has-border.is-normal {
position: relative;
}
.ohu-select__input.has-border.is-normal::after {
content: "";
box-sizing: border-box;
position: absolute;
z-index: 1;
pointer-events: none;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 1Px solid #ccc;
border-radius: 8Px;
}
@media only screen and (-webkit-min-device-pixel-ratio: 2) {
.ohu-select__input.has-border.is-normal::after {
width: 200%;
height: 200%;
transform: scale(0.5);
transform-origin: 0 0;
}
}
.ohu-select__input.has-border.is-outline {
border-style: solid;
position: relative;
}
.ohu-select__input.has-border.is-outline::after {
content: "";
box-sizing: border-box;
position: absolute;
z-index: 1;
pointer-events: none;
border-style: inherit;
border-width: 1Px 0 0;
right: 0;
bottom: 0;
left: 0;
border-color: #ccc;
}
@media screen and (-webkit-min-device-pixel-ratio: 2) {
.ohu-select__input.has-border.is-outline::after {
transform: scaleY(0.5);
transform-origin: center top;
}
}
.ohu-select__input__control {
color: #333;
min-height: 1.375em;
flex-grow: 1;
}
.ohu-select__input__placeholder {
color: #999;
flex-grow: 1;
}
.ohu-select__input__icon {
margin-left: 20px;
width: 1.5em;
height: 1.5em;
color: #999;
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: center;
}
.ohu-select__input__icon .ohu-icon {
font-size: 1.3em;
}
.ohu-select__input__icon.is-close .ohu-icon {
font-size: 1.125em;
}
.ohu-select__input select {
position: absolute;
font-size: 32px;
top: 0;
left: 0;
outline: 0;
width: 100%;
height: 100%;
opacity: 0;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
background: none;
-webkit-appearance: none;
}