Skip to content

Commit

Permalink
Bug fix(Avatar): Changed rounded border calculation for the "square" …
Browse files Browse the repository at this point in the history
…Avatar to better align with existing border styles (#5077)

* Bug fix, make the "square" rounded border match existing borders better.

* Create large-plants-unite.md
  • Loading branch information
jonrohan authored Oct 7, 2024
1 parent e4965ed commit 6490b27
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/large-plants-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Bug fix(Avatar): Changed rounded border calculation for the "square" Avatar to better align with existing border styles
3 changes: 2 additions & 1 deletion packages/react/src/Avatar/Avatar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
box-shadow: 0 0 0 1px var(--avatar-borderColor);

&:where([data-square]) {
border-radius: var(--borderRadius-medium);
/* stylelint-disable-next-line primer/borders */
border-radius: clamp(4px, calc(var(--avatarSize-regular) - 24px), var(--borderRadius-medium));
}

&:where([data-responsive]) {
Expand Down

0 comments on commit 6490b27

Please sign in to comment.