UNPKG

@ionic/core

Version:

Base components for Ionic

177 lines (156 loc) • 4.21 kB
ion-refresher { left: 0; top: 0; display: none; position: absolute; width: 100%; height: 60px; pointer-events: none; z-index: -1; } [dir=rtl] ion-refresher, :host-context([dir=rtl]) ion-refresher { left: unset; right: unset; right: 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; } [dir=rtl] .refresher-pulling-icon, :host-context([dir=rtl]) .refresher-pulling-icon, [dir=rtl] .refresher-refreshing-icon, :host-context([dir=rtl]) .refresher-refreshing-icon { 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; } .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 { margin-left: auto; margin-right: auto; margin-top: 0; margin-bottom: 0; } @supports (margin-inline-start: 0) or (-webkit-margin-start: 0) { ion-refresher.refresher-native ion-spinner { margin-left: unset; margin-right: unset; -webkit-margin-start: auto; margin-inline-start: auto; -webkit-margin-end: auto; margin-inline-end: auto; } } .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.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; } @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); } }