UNPKG

@ionic/core

Version:
231 lines (217 loc) 5.99 kB
/** * Convert a font size to a dynamic font size. * Fonts that participate in Dynamic Type should use * dynamic font sizes. * @param size - The initial font size including the unit (i.e. px or pt) * @param unit (optional) - The unit to convert to. Use this if you want to * convert to a unit other than $baselineUnit. */ /** * Convert a font size to a dynamic font size but impose * a maximum font size. * @param size - The initial font size including the unit (i.e. px or pt) * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale). * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to * convert to a unit other than $baselineUnit. */ /** * Convert a font size to a dynamic font size but impose * a minimum font size. * @param size - The initial font size including the unit (i.e. px or pt) * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale). * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to * convert to a unit other than $baselineUnit. */ /** * Convert a font size to a dynamic font size but impose * maximum and minimum font sizes. * @param size - The initial font size including the unit (i.e. px or pt) * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale). * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale). * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to * convert to a unit other than $baselineUnit. */ /** * A heuristic that applies CSS to tablet * viewports. * * Usage: * @include tablet-viewport() { * :host { * background-color: green; * } * } */ /** * A heuristic that applies CSS to mobile * viewports (i.e. phones, not tablets). * * Usage: * @include mobile-viewport() { * :host { * background-color: blue; * } * } */ .picker-col { display: flex; position: relative; flex: 1; justify-content: center; height: 100%; box-sizing: content-box; contain: content; } .picker-opts { position: relative; flex: 1; max-width: 100%; } .picker-opt { top: 0; display: block; position: absolute; width: 100%; border: 0; text-align: center; text-overflow: ellipsis; white-space: nowrap; contain: strict; overflow: hidden; will-change: transform; } .picker-opt { inset-inline-start: 0; } .picker-opt.picker-opt-disabled { pointer-events: none; } .picker-opt-disabled { opacity: 0; } .picker-opts-left { justify-content: flex-start; } .picker-opts-right { justify-content: flex-end; } .picker-opt:active, .picker-opt:focus { outline: none; } .picker-prefix { position: relative; flex: 1; text-align: end; white-space: nowrap; } .picker-suffix { position: relative; flex: 1; text-align: start; white-space: nowrap; } /** * Convert a font size to a dynamic font size. * Fonts that participate in Dynamic Type should use * dynamic font sizes. * @param size - The initial font size including the unit (i.e. px or pt) * @param unit (optional) - The unit to convert to. Use this if you want to * convert to a unit other than $baselineUnit. */ /** * Convert a font size to a dynamic font size but impose * a maximum font size. * @param size - The initial font size including the unit (i.e. px or pt) * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale). * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to * convert to a unit other than $baselineUnit. */ /** * Convert a font size to a dynamic font size but impose * a minimum font size. * @param size - The initial font size including the unit (i.e. px or pt) * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale). * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to * convert to a unit other than $baselineUnit. */ /** * Convert a font size to a dynamic font size but impose * maximum and minimum font sizes. * @param size - The initial font size including the unit (i.e. px or pt) * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale). * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale). * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to * convert to a unit other than $baselineUnit. */ /** * A heuristic that applies CSS to tablet * viewports. * * Usage: * @include tablet-viewport() { * :host { * background-color: green; * } * } */ /** * A heuristic that applies CSS to mobile * viewports (i.e. phones, not tablets). * * Usage: * @include mobile-viewport() { * :host { * background-color: blue; * } * } */ .picker-col { -webkit-padding-start: 4px; padding-inline-start: 4px; -webkit-padding-end: 4px; padding-inline-end: 4px; padding-top: 0; padding-bottom: 0; transform-style: preserve-3d; } .picker-prefix, .picker-suffix, .picker-opts { top: 77px; transform-style: preserve-3d; color: inherit; font-size: 20px; line-height: 42px; pointer-events: none; } .picker-opt { padding-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0; transform-origin: center center; height: 46px; transform-style: preserve-3d; transition-timing-function: ease-out; background: transparent; color: inherit; font-size: 20px; line-height: 42px; backface-visibility: hidden; pointer-events: auto; } :host-context([dir=rtl]) .picker-opt { transform-origin: calc(100% - center) center; } [dir=rtl] .picker-opt { transform-origin: calc(100% - center) center; } @supports selector(:dir(rtl)) { .picker-opt:dir(rtl) { transform-origin: calc(100% - center) center; } }