Skip to content

Commit

Permalink
refactor(comp: carousel): extract less variable (#703)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzaijiang committed Jan 6, 2022
1 parent 45a9763 commit 56f1b52
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 5 additions & 4 deletions packages/components/carousel/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
.carousel-vertical-center();

&:hover {
opacity: @carousel-icon-active-opacity;
opacity: @carousel-icon-hover-opacity;
}

&-prev {
Expand Down Expand Up @@ -60,10 +60,11 @@
}

&-default {
width: @carousel-dot-size;
height: @carousel-dot-size;
border-radius: 50%;
width: @carousel-dot-width;
height: @carousel-dot-height;
border-radius: @carousel-dot-border-radius;
background-color: @carousel-dot-background-color;
outline: none;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
@carousel-arrow-color: @color-white;
@carousel-arrow-spacing: @spacing-gutter;

@carousel-dot-size: @spacing-gutter;
@carousel-dot-width: @spacing-gutter;
@carousel-dot-height: @spacing-gutter;
@carousel-dot-background-color: @color-white;
@carousel-dot-gap: @spacing-md;
@carousel-dot-spacing: @spacing-lg;
@carousel-dot-border-radius: 50%;

@carousel-icon-opacity: 0.3;
@carousel-icon-hover-opacity: 0.6;
@carousel-icon-active-opacity: 0.8;

0 comments on commit 56f1b52

Please sign in to comment.