Skip to content

Commit

Permalink
[components] Improve avatar CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard authored and rexxars committed Oct 6, 2020
1 parent 2b2ffb8 commit 9dbff3f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion packages/@sanity/components/src/avatar/avatarCounter.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@
box-sizing: border-box;
user-select: none;
color: inherit;
box-shadow: inset 0 0 0 1.5px var(--gray);
box-shadow: inset 0 0 0 1.5px var(--gray-light);
color: var(--component-text-color);

@nest &[data-tone='navbar'] {
box-shadow: inset 0 0 0 1.5px
color(var(--main-navigation-color) blend(var(--main-navigation-color--inverted) 40%));
color: var(--main-navigation-color--inverted);
}

@nest & > span {
margin-top: -1px;
Expand Down
4 changes: 2 additions & 2 deletions packages/@sanity/components/src/avatar/avatarStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ export function AvatarStack(props: AvatarStackProps & React.HTMLProps<HTMLDivEle
<div {...restProps} className={classNames(styles.root, className)} data-size={size}>
{len === 0 && (
<div>
<AvatarCounter count={len} />
<AvatarCounter count={len} tone={tone} />
</div>
)}

{len !== 0 && extraCount > 1 && (
<div>
<AvatarCounter count={extraCount} size={size} />
<AvatarCounter count={extraCount} size={size} tone={tone} />
</div>
)}

Expand Down

0 comments on commit 9dbff3f

Please sign in to comment.