Skip to content

Commit

Permalink
fix(button): retain transparent button focus background (#2489)
Browse files Browse the repository at this point in the history
  • Loading branch information
denkristoffer committed May 24, 2023
1 parent 6265bde commit cbef6dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/stupid-readers-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@contentful/f36-button": patch
---

fix(button): keep transparent button focus background
5 changes: 1 addition & 4 deletions packages/components/button/src/Button/Button.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)': {
Expand Down

1 comment on commit cbef6dc

@vercel
Copy link

@vercel vercel bot commented on cbef6dc May 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.