@ionic/core
Version:
Base components for Ionic
174 lines (160 loc) • 4.76 kB
CSS
:host {
/**
* @prop --background: Background of the picker
* @prop --background-rgb: Background of the picker in rgb format
*
* @prop --border-radius: Border radius of the picker
* @prop --border-color: Border color of the picker
* @prop --border-width: Border width of the picker
* @prop --border-style: Border style of the picker
*
* @prop --min-width: Minimum width of the picker
* @prop --width: Width of the picker
* @prop --max-width: Maximum width of the picker
*
* @prop --min-height: Minimum height of the picker
* @prop --height: Height of the picker
* @prop --max-height: Maximum height of the picker
*/
--border-radius: 0;
--border-style: solid;
--min-width: auto;
--width: 100%;
--max-width: 500px;
--min-height: auto;
--max-height: auto;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
left: 0;
top: 0;
display: block;
position: absolute;
width: 100%;
height: 100%;
font-family: var(--ion-font-family, inherit);
contain: strict;
user-select: none;
z-index: 1000; }
:host([dir=rtl]) + b {
right: 0; }
:host(.overlay-hidden) {
display: none; }
.picker-wrapper {
border-radius: var(--border-radius);
left: 0;
right: 0;
bottom: 0;
margin-left: auto;
margin-right: auto;
margin-top: auto;
margin-bottom: auto;
transform: translate3d(0, 100%, 0);
display: flex;
position: absolute;
flex-direction: column;
width: var(--width);
min-width: var(--min-width);
max-width: var(--max-width);
height: var(--height);
min-height: var(--min-height);
max-height: var(--max-height);
border-width: var(--border-width);
border-style: var(--border-style);
border-color: var(--border-color);
background: var(--background);
contain: strict;
overflow: hidden;
z-index: 10; }
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
.picker-wrapper {
margin-left: unset;
margin-right: unset;
-webkit-margin-start: auto;
margin-inline-start: auto;
-webkit-margin-end: auto;
margin-inline-end: auto; } }
.picker-toolbar {
width: 100%;
background: transparent;
contain: strict;
z-index: 1; }
.picker-button {
border: 0;
font-family: inherit; }
.picker-button:active, .picker-button:focus {
outline: none; }
.picker-columns {
display: flex;
position: relative;
justify-content: center;
margin-bottom: var(--ion-safe-area-bottom, 0);
contain: strict;
direction: ltr;
overflow: hidden; }
.picker-above-highlight,
.picker-below-highlight {
display: none;
pointer-events: none; }
:host {
--background: var(--ion-background-color, #fff);
--border-width: 0.55px 0 0;
--border-color: var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));
--height: 260px;
color: var(--ion-item-color, var(--ion-text-color, #000)); }
.picker-toolbar {
display: flex;
justify-content: flex-end;
height: 44px; }
.picker-button,
.picker-button.activated {
margin-left: 0;
margin-right: 0;
margin-top: 0;
margin-bottom: 0;
padding-left: 1.1em;
padding-right: 1.1em;
padding-top: 0;
padding-bottom: 0;
height: 44px;
background: transparent;
color: var(--ion-color-primary, #3880ff);
font-size: 14px;
font-weight: 500;
text-transform: uppercase;
box-shadow: none; }
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
.picker-button,
.picker-button.activated {
padding-left: unset;
padding-right: unset;
-webkit-padding-start: 1.1em;
padding-inline-start: 1.1em;
-webkit-padding-end: 1.1em;
padding-inline-end: 1.1em; } }
.picker-columns {
height: 216px;
perspective: 1800px; }
.picker-above-highlight {
left: 0;
top: 0;
transform: translate3d(0, 0, 90px);
position: absolute;
width: 100%;
height: 81px;
border-bottom: 1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));
background: linear-gradient(to bottom, var(--ion-background-color, #fff) 20%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);
z-index: 10; }
:host-context([dir=rtl]) .picker-above-highlight {
right: 0; }
.picker-below-highlight {
left: 0;
top: 115px;
transform: translate3d(0, 0, 90px);
position: absolute;
width: 100%;
height: 119px;
border-top: 1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));
background: linear-gradient(to top, var(--ion-background-color, #fff) 30%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);
z-index: 11; }
:host-context([dir=rtl]) .picker-below-highlight {
right: 0; }