[improvement] Skeleton: add less vars

This commit is contained in:
陈嘉涵 2019-05-10 19:42:58 +08:00
parent 43dd749075
commit 5cd810d480
2 changed files with 12 additions and 5 deletions

View File

@ -7,7 +7,7 @@
&__avatar { &__avatar {
flex-shrink: 0; flex-shrink: 0;
margin-right: 15px; margin-right: 15px;
background-color: @active-color; background-color: @skeleton-avatar-background-color;
&--round { &--round {
border-radius: 100%; border-radius: 100%;
@ -24,8 +24,8 @@
&__row, &__row,
&__title { &__title {
height: 16px; height: @skeleton-row-height;
background-color: @active-color; background-color: @skeleton-row-background-color;
} }
&__title { &__title {
@ -34,7 +34,7 @@
&__row { &__row {
&:not(:first-child) { &:not(:first-child) {
margin-top: 12px; margin-top: @skeleton-row-margin-top;
} }
} }
@ -43,7 +43,7 @@
} }
&--animate { &--animate {
animation: van-skeleton-blink 1.2s ease-in-out infinite; animation: van-skeleton-blink @skeleton-animation-duration ease-in-out infinite;
} }
} }

View File

@ -245,6 +245,13 @@
@sidebar-selected-border-color: @red; @sidebar-selected-border-color: @red;
@sidebar-selected-background-color: @white; @sidebar-selected-background-color: @white;
// Skeleton
@skeleton-row-height: 16px;
@skeleton-row-background-color: @active-color;
@skeleton-row-margin-top: 12px;
@skeleton-avatar-background-color: @active-color;
@skeleton-animation-duration: 1.2s;
// Slider // Slider
@slider-active-background-color: @blue; @slider-active-background-color: @blue;
@slider-inactive-background-color: @gray-light; @slider-inactive-background-color: @gray-light;