@import './mixins/mixins.scss'; @keyframes n-scroll-number-fade-up-in { from { transform: translateY(60%); opacity: 0; } to { transform: translateY(0); opacity: 1; } } @keyframes n-scroll-number-fade-down-in { from { transform: translateY(-60%); opacity: 0; } to { transform: translateY(0); opacity: 1; } } @keyframes n-scroll-number-fade-up-out { from { transform: translateY(0%); opacity: 1; } to { transform: translateY(-60%); opacity: 0; } } @keyframes n-scroll-number-fade-down-out { from { transform: translateY(0%); opacity: 1; } to { transform: translateY(60%); opacity: 0; } } @include b(scroll-numbers) { overflow: hidden; white-space: nowrap; display: inline-block; height: 18px; line-height: 18px; @include b(scroll-number) { @include fade-up-width-expand-transition($duration: .2s); @include fade-in-width-expand-transition($duration: .2s, $delay: 0s); display: inline-block; position: relative; height: 18px; @include b(scroll-number-old-number) { display: inline-block; opacity: 0; position: absolute; left: 0; @include m(top) { transform: translateY(-100%); } @include m(bottom) { transform: translateY(100%); } @include m(down-scroll) { animation: n-scroll-number-fade-down-out .2s $--n-ease-out-cubic-bezier; animation-iteration-count: 1 } @include m(up-scroll) { animation: n-scroll-number-fade-up-out .2s $--n-ease-out-cubic-bezier; animation-iteration-count: 1 } } @include b(scroll-number-current-number) { display: inline-block; position: absolute; left: 0; top: 0; bottom: 0; right: 0; opacity: 1; transform: translateY(0); @include m(down-scroll) { animation: n-scroll-number-fade-down-in .2s $--n-ease-out-cubic-bezier; animation-iteration-count: 1 } @include m(up-scroll) { animation: n-scroll-number-fade-up-in .2s $--n-ease-out-cubic-bezier; animation-iteration-count: 1 } @include e(inner) { display: inline-block; position: absolute; right: 0; top: 0; @include m(not-number) { right: unset; left: 0; } } } } }