style: enlarge Carousel dots hover area (#38257)

This commit is contained in:
afc163 2022-10-28 11:17:01 +08:00 committed by GitHub
parent 03d716e750
commit 444a8e3c75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@
@import '../../style/mixins/index';
@carousel-prefix-cls: ~'@{ant-prefix}-carousel';
@carousel-dot-margin: 4px;
.@{carousel-prefix-cls} {
.reset-component();
@ -201,9 +202,7 @@
box-sizing: content-box;
width: @carousel-dot-width;
height: @carousel-dot-height;
margin: 0 2px;
margin-right: 3px;
margin-left: 3px;
margin: 0 @carousel-dot-margin;
padding: 0;
text-align: center;
text-indent: -999px;
@ -211,6 +210,7 @@
transition: all 0.5s;
button {
position: relative;
display: block;
width: 100%;
height: @carousel-dot-height;
@ -229,6 +229,15 @@
&:focus {
opacity: 0.75;
}
&::after {
position: absolute;
top: -@carousel-dot-margin;
right: -@carousel-dot-margin;
bottom: -@carousel-dot-margin;
left: -@carousel-dot-margin;
content: '';
}
}
&.slick-active {
@ -271,7 +280,7 @@
li {
width: @carousel-dot-height;
height: @carousel-dot-width;
margin: 4px 2px;
margin: @carousel-dot-margin 0;
vertical-align: baseline;
button {