fix(sidebar): center notification dot on avatar corner
The dot badge (8px circle) was positioned at top:-2px, left:-2px which placed its CENTER 2px inside the avatar corner rather than on the corner itself. Changed to top:-4px, left:-4px so the dot is centered exactly on the top-left corner of the avatar, matching how the count badge (top:-6px for ~12px height) is positioned. Also updated the folder compound variant dot position from +2px to 0px for consistency. Fixes #293
This commit is contained in:
1 parent
cf4c3905c8
commit
85aac4ff64
5 files changed
+9
-9
No files matched your search
@@ -134,8 +134,8 @@ export const SidebarItemBadge = recipe({
|
||||
left: toRem(-6),
|
||||
},
|
||||
false: {
|
||||
top: toRem(-2),
|
||||
left: toRem(-2),
|
||||
top: toRem(-4),
|
||||
left: toRem(-4),
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -167,9 +167,9 @@ export const SidebarItemBadge = recipe({
|
||||
style: {
|
||||
selectors: {
|
||||
'div:has(> button[data-id]) &': {
|
||||
top: toRem(2),
|
||||
top: toRem(0),
|
||||
left: 'auto',
|
||||
right: toRem(2),
|
||||
right: toRem(0),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -141,7 +141,7 @@ function DMItem({ room, selected }: DMItemProps) {
|
||||
<SidebarItemBadge
|
||||
hasCount={unread.total > 0}
|
||||
style={{
|
||||
left: unread.total > 0 ? toRem(-6) : toRem(-2),
|
||||
left: unread.total > 0 ? toRem(-6) : toRem(-4),
|
||||
right: 'auto',
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -118,7 +118,7 @@ export function DirectTab() {
|
||||
<SidebarItemBadge
|
||||
hasCount={directUnread.total > 0}
|
||||
style={{
|
||||
left: directUnread.total > 0 ? toRem(-6) : toRem(-2),
|
||||
left: directUnread.total > 0 ? toRem(-6) : toRem(-4),
|
||||
right: 'auto',
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -112,7 +112,7 @@ export function HomeTab() {
|
||||
<SidebarItemBadge
|
||||
hasCount={homeUnread.total > 0}
|
||||
style={{
|
||||
left: homeUnread.total > 0 ? toRem(-6) : toRem(-2),
|
||||
left: homeUnread.total > 0 ? toRem(-6) : toRem(-4),
|
||||
right: 'auto',
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -468,7 +468,7 @@ function SpaceTab({
|
||||
<SidebarItemBadge
|
||||
hasCount={unread.total > 0}
|
||||
style={{
|
||||
left: unread.total > 0 ? toRem(-6) : toRem(-2),
|
||||
left: unread.total > 0 ? toRem(-6) : toRem(-4),
|
||||
right: 'auto',
|
||||
}}
|
||||
>
|
||||
@@ -609,7 +609,7 @@ function ClosedSpaceFolder({
|
||||
<SidebarItemBadge
|
||||
hasCount={unread.total > 0}
|
||||
style={{
|
||||
left: unread.total > 0 ? toRem(-6) : toRem(-2),
|
||||
left: unread.total > 0 ? toRem(-6) : toRem(-4),
|
||||
right: 'auto',
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user