From cbef6dc2b10a11bf431b7a8c1ef60271f2377a41 Mon Sep 17 00:00:00 2001 From: Kristoffer Date: Wed, 24 May 2023 17:53:47 +0200 Subject: [PATCH] fix(button): retain transparent button focus background (#2489) --- .changeset/stupid-readers-heal.md | 5 +++++ packages/components/button/src/Button/Button.styles.ts | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 .changeset/stupid-readers-heal.md diff --git a/.changeset/stupid-readers-heal.md b/.changeset/stupid-readers-heal.md new file mode 100644 index 0000000000..17f8b32dfb --- /dev/null +++ b/.changeset/stupid-readers-heal.md @@ -0,0 +1,5 @@ +--- +"@contentful/f36-button": patch +--- + +fix(button): keep transparent button focus background diff --git a/packages/components/button/src/Button/Button.styles.ts b/packages/components/button/src/Button/Button.styles.ts index 50b7101558..0fab112246 100644 --- a/packages/components/button/src/Button/Button.styles.ts +++ b/packages/components/button/src/Button/Button.styles.ts @@ -117,18 +117,15 @@ const variantToStyles = (variant: ButtonVariant): CSSObject => { }; case 'transparent': return { - color: tokens.gray800, + color: tokens.gray900, background: 'none', borderColor: 'transparent', boxShadow: 'none', '&:hover': { backgroundColor: hexToRGBA(tokens.gray900, 0.05), - color: tokens.gray900, }, '&:active': variantActiveStyles(variant), '&:focus': { - backgroundColor: hexToRGBA(tokens.gray900, 0.05), - color: tokens.gray900, boxShadow: tokens.glowPrimary, }, '&:focus:not(:focus-visible)': {