Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
inbox: Tighten unread focus ring around the badge.
Alya Abbott8e705caf8e96
diff --git a/web/styles/inbox.css b/web/styles/inbox.cssindex 3208a454683..9cf8ec3dd97 100644--- a/web/styles/inbox.css+++ b/web/styles/inbox.css@@ -827,23 +827,39 @@}}- /* Outline on the row-tall click wrapper rather than the- inner badge, with `-2px` offset so the painted ring sits- 2px inside the wrapper edges — matching the action button- and state-marker focus rings (also -2px on a 30px wrapper)- so all four inbox focus indicators read at the same 26px- outer height. */+ /* Focus ring drawn as a pseudo-element on the inner badge,+ with `5px` of breathing room outside the badge and `5px`+ corners on the ring so it visually matches the action+ button and state-marker rings, which paint at 3px effective+ (5px `border-radius` minus 2px `outline-offset`) but on+ smaller (~26×26) wrappers. Using straight `5px` corners on+ this larger (~26×28) ring keeps the perceived corner+ roundness consistent with the inbox's other focus+ indicators. A wrapper-sized outline (the previous+ implementation) leaves a wide gap between the ring and+ the badge fill that reads as a second concentric outline;+ the deliberate 5px gap here reads as padding around a+ single badge instead. */.unread-count-focus-outline {&:focus-visible {- outline: var(--focus-ring-outline);- outline-offset: -0.125em; /* -2px at 16px/1em */- border-radius: 0.3125em; /* 5px at 16px/1em */+ outline: none;- /* Suppress the inner badge's `inset` `box-shadow`- (from `.normal-count`) so it doesn't read as a- second, narrower outline inside the focus ring. */.unread_count {+ position: relative;++ /* Suppress the inner `.normal-count` `inset`+ `box-shadow` so it doesn't sit as a second,+ narrower outline inside the focus ring. */box-shadow: none;++ &::after {+ content: "";+ position: absolute;+ inset: -0.3125em; /* -5px at 16px/1em */+ border: var(--focus-ring-outline);+ border-radius: 0.3125em; /* 5px at 16px/1em */+ pointer-events: none;+ }}}}