Skip to content

Commit

Permalink
fix(comp:carousel): dot clickable area is too small (#1590)
Browse files Browse the repository at this point in the history
  • Loading branch information
sallerli1 authored Jul 4, 2023
1 parent 1e23dc3 commit 7138b40
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions packages/components/carousel/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
}
}


&-vertical &-slider {
height: auto;
}
Expand Down Expand Up @@ -114,11 +113,24 @@
}

&-dot {
position: relative;
display: flex;
align-items: center;
justify-content: center;
opacity: @carousel-icon-opacity;
cursor: pointer;
line-height: @carousel-dot-vertical-width;
font-size: 0; // 消除幽灵高度,避免影响间距计算

&::after {
position: absolute;
top: ~'calc(-1 * min(max(200%, 16px), 32px) / 2 + 100% / 2)';
left: 0;
display: block;
content: ' ';
width: 100%;
height: ~'min(max(200%, 16px), 32px)';
}

&:hover,
&-active {
opacity: @carousel-icon-active-opacity;
Expand Down Expand Up @@ -152,6 +164,13 @@
width: @carousel-dot-vertical-width;
height: @carousel-dot-vertical-height;
}

&::after {
top: 0;
left: ~'calc(-1 * min(max(200%, 16px), 32px) / 2 + 100% / 2)';
width: ~'min(max(200%, 16px), 32px)';
height: 100%;
}
}

&-horizontal &-dot + &-dot {
Expand Down

0 comments on commit 7138b40

Please sign in to comment.