UNPKG

@ionic/core

Version:
298 lines (272 loc) • 8.36 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; * } * } */ ion-refresher { top: 0; display: none; position: absolute; width: 100%; height: 60px; pointer-events: none; z-index: -1; } ion-refresher { inset-inline-start: 0; } ion-refresher.refresher-active { display: block; } ion-refresher-content { display: flex; flex-direction: column; justify-content: center; height: 100%; } .refresher-pulling, .refresher-refreshing { display: none; width: 100%; } .refresher-pulling-icon, .refresher-refreshing-icon { transform-origin: center; transition: 200ms; font-size: 30px; text-align: center; } :host-context([dir=rtl]) .refresher-pulling-icon, :host-context([dir=rtl]) .refresher-refreshing-icon { transform-origin: calc(100% - center); } [dir=rtl] .refresher-pulling-icon, [dir=rtl] .refresher-refreshing-icon { transform-origin: calc(100% - center); } @supports selector(:dir(rtl)) { .refresher-pulling-icon:dir(rtl), .refresher-refreshing-icon:dir(rtl) { transform-origin: calc(100% - center); } } .refresher-pulling-text, .refresher-refreshing-text { font-size: 16px; text-align: center; } ion-refresher-content .arrow-container { display: none; } .refresher-pulling ion-refresher-content .refresher-pulling { display: block; } .refresher-ready ion-refresher-content .refresher-pulling { display: block; } .refresher-ready ion-refresher-content .refresher-pulling-icon { transform: rotate(180deg); } .refresher-refreshing ion-refresher-content .refresher-refreshing { display: block; } .refresher-cancelling ion-refresher-content .refresher-pulling { display: block; } .refresher-cancelling ion-refresher-content .refresher-pulling-icon { transform: scale(0); } .refresher-completing ion-refresher-content .refresher-refreshing { display: block; } .refresher-completing ion-refresher-content .refresher-refreshing-icon { transform: scale(0); } .refresher-native .refresher-pulling-text, .refresher-native .refresher-refreshing-text { display: none; } /** * 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; * } * } */ .refresher-ios .refresher-pulling-icon, .refresher-ios .refresher-refreshing-icon { color: var(--ion-text-color, #000); } .refresher-ios .refresher-pulling-text, .refresher-ios .refresher-refreshing-text { color: var(--ion-text-color, #000); } .refresher-ios .refresher-refreshing .spinner-lines-ios line, .refresher-ios .refresher-refreshing .spinner-lines-small-ios line, .refresher-ios .refresher-refreshing .spinner-crescent circle { stroke: var(--ion-text-color, #000); } .refresher-ios .refresher-refreshing .spinner-bubbles circle, .refresher-ios .refresher-refreshing .spinner-circles circle, .refresher-ios .refresher-refreshing .spinner-dots circle { fill: var(--ion-text-color, #000); } ion-refresher.refresher-native { display: block; z-index: 1; } ion-refresher.refresher-native ion-spinner { -webkit-margin-start: auto; margin-inline-start: auto; -webkit-margin-end: auto; margin-inline-end: auto; margin-top: 0; margin-bottom: 0; } .refresher-native .refresher-refreshing ion-spinner { --refreshing-rotation-duration: 2s; display: none; animation: var(--refreshing-rotation-duration) ease-out refresher-rotate forwards; } .refresher-native .refresher-refreshing { display: none; animation: 250ms linear refresher-pop forwards; } .refresher-native ion-spinner { width: 32px; height: 32px; color: var(--ion-color-step-450, var(--ion-background-color-step-450, #747577)); } .refresher-native.refresher-refreshing .refresher-pulling ion-spinner, .refresher-native.refresher-completing .refresher-pulling ion-spinner { display: none; } .refresher-native.refresher-refreshing .refresher-refreshing ion-spinner, .refresher-native.refresher-completing .refresher-refreshing ion-spinner { display: block; } .refresher-native.refresher-pulling .refresher-pulling ion-spinner { display: block; } .refresher-native.refresher-pulling .refresher-refreshing ion-spinner { display: none; } .refresher-native.refresher-completing ion-refresher-content .refresher-refreshing-icon { transform: scale(0) rotate(180deg); transition: 300ms; } @keyframes refresher-pop { 0% { transform: scale(1); animation-timing-function: ease-in; } 50% { transform: scale(1.2); animation-timing-function: ease-out; } 100% { transform: scale(1); } } @keyframes refresher-rotate { from { transform: rotate(0deg); } to { transform: rotate(180deg); } }