mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
169 lines
3.5 KiB
SCSS
169 lines
3.5 KiB
SCSS
@import './mixins/mixins.scss';
|
|
@import './themes/vars.scss';
|
|
|
|
@keyframes n-number-fade-up-in {
|
|
from {
|
|
transform: translateY(60%);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes n-number-fade-down-in {
|
|
from {
|
|
transform: translateY(-60%);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes n-number-fade-up-out {
|
|
from {
|
|
transform: translateY(0%);
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
transform: translateY(-60%);
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
@keyframes n-number-fade-down-out {
|
|
from {
|
|
transform: translateY(0%);
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
transform: translateY(60%);
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
// @keyframes n-number-slide-in {
|
|
// from {
|
|
// transform: translateX(-100%);
|
|
// }
|
|
// to {
|
|
// transform: translateX(0);
|
|
// }
|
|
// }
|
|
|
|
// @keyframes n-number-slide-out {
|
|
// from {
|
|
// transform: translateX(0);
|
|
// }
|
|
// to {
|
|
// transform: translateX(-100%);
|
|
// }
|
|
// }
|
|
|
|
@include b(scroll-numbers) {
|
|
white-space: nowrap;
|
|
@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-number-fade-down-out .2s $fast-in-cubic-bezier;
|
|
animation-iteration-count: 1
|
|
}
|
|
@include m(up-scroll) {
|
|
animation: n-number-fade-up-out .2s $fast-in-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-number-fade-down-in .2s $fast-in-cubic-bezier;
|
|
animation-iteration-count: 1
|
|
}
|
|
@include m(up-scroll) {
|
|
animation: n-number-fade-up-in .2s $fast-in-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;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@mixin badge-type-mixin ($type) {
|
|
@include m($type + '-type') {
|
|
@include b(badge-sup) {
|
|
background-color: rgba(9, 133, 91, 1);
|
|
}
|
|
}
|
|
}
|
|
|
|
@include b(badge) {
|
|
display: inline-block;
|
|
position: relative;
|
|
vertical-align: middle;
|
|
@include m(dot) {
|
|
@include b(badge-sup) {
|
|
height: 8px;
|
|
width: 8px;
|
|
padding: 0;
|
|
min-width: 8px;
|
|
left: calc(100% - 4px);
|
|
bottom: calc(100% - 4px);
|
|
}
|
|
}
|
|
// @include badge-type-mixin('info');
|
|
// @include badge-type-mixin('success');
|
|
// @include badge-type-mixin('warning');
|
|
// @include badge-type-mixin('error');
|
|
}
|
|
|
|
@include b(badge-sup) {
|
|
@include fade-in-scale-up-transition(badge, left bottom);
|
|
overflow: hidden;
|
|
color: white;
|
|
user-select: none;
|
|
position: absolute;
|
|
height: 18px;
|
|
line-height: 18px;
|
|
border-radius: 9px;
|
|
background-color: rgb(232, 0, 0);// rgba(186, 45, 67, 1);
|
|
padding: 0 6px;
|
|
text-align: center;
|
|
font-size: 12px;
|
|
left: calc(100% - 8px);
|
|
bottom: calc(100% - 8px);
|
|
font-weight: bold;
|
|
} |