Browse Source

ref(button): Remove hover background from focus state (#36978)

Vu Luong 2 years ago
parent
commit
109b0982eb
1 changed files with 13 additions and 8 deletions
  1. 13 8
      static/app/components/button.tsx

+ 13 - 8
static/app/components/button.tsx

@@ -325,14 +325,19 @@ const getColors = ({
 
     ${size !== 'zero' &&
     `
-    &:hover,
-    &:active,
-    &.focus-visible,
-    &[aria-expanded="true"] {
-      color: ${colorActive || color};
-      background: ${backgroundActive};
-      border-color: ${borderless || priority === 'link' ? 'transparent' : borderActive};
-    }`}
+      &:hover,
+      &:active,
+      &[aria-expanded="true"] {
+        color: ${colorActive || color};
+        background: ${backgroundActive};
+        border-color: ${borderless || priority === 'link' ? 'transparent' : borderActive};
+      }
+
+      &.focus-visible {
+        color: ${colorActive || color};
+        border-color: ${borderActive};
+      }
+    `}
 
     &.focus-visible {
       ${getFocusState()}