1
0
Эх сурвалжийг харах

fix: after update the anchor click area, a11y offset should be internal (#1116)

YannLynn 3 жил өмнө
parent
commit
12d2f3dbde

+ 1 - 7
packages/semi-foundation/anchor/anchor.scss

@@ -18,8 +18,6 @@ $module: #{$prefix}-anchor;
         left: $spacing-anchor_slide-left;
         top: $spacing-anchor_slide-top;
         height: 100%;
-        box-sizing: border-box;
-        padding: $width-anchor-outline 0;
 
         &-muted {
             display: none;
@@ -66,11 +64,6 @@ $module: #{$prefix}-anchor;
 
     &-link {
 
-        &-wrapper {
-            padding-right: $width-anchor-outline;
-            margin: $width-anchor-outline 0;
-        }
-
         &-title {
             cursor: pointer;
             color: $color-anchor_title-text-default;
@@ -92,6 +85,7 @@ $module: #{$prefix}-anchor;
 
             &:focus-visible {
                 outline: $width-anchor-outline solid $color-anchor_title-outline-focus;
+                outline-offset: $width-anchor-outlineOffset;
             }
 
             &-disabled {

+ 1 - 0
packages/semi-foundation/anchor/variables.scss

@@ -30,4 +30,5 @@ $radius-anchor_slide: 1px; // 滑轨圆角
 
 // Witdh
 $width-anchor-outline: 2px; // anchor轮廓宽度
+$width-anchor-outlineOffset: -2px; // anchor轮廓 outline-offset 宽度
 $width-anchor-outline_border_radius: 3px; // anchor轮廓圆角