Skip to content

Commit 6490b27

Browse files
authored
Bug fix(Avatar): Changed rounded border calculation for the "square" 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
1 parent e4965ed commit 6490b27

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/large-plants-unite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/react": patch
3+
---
4+
5+
Bug fix(Avatar): Changed rounded border calculation for the "square" Avatar to better align with existing border styles

packages/react/src/Avatar/Avatar.module.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
box-shadow: 0 0 0 1px var(--avatar-borderColor);
1414

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

1920
&:where([data-responsive]) {

0 commit comments

Comments
 (0)