Skip to content

Commit a71886a

Browse files
committed
fix(webapp): inset the focus ring so it is not clipped
The shared focus-custom outline sat just outside the border box (offset 0), so it was clipped by any ancestor with overflow hidden/auto (scroll areas, the side menu grid) and covered by adjacent elements' backgrounds. Draw it 1px inside instead so the full ring is always visible. Applies everywhere focus-custom is used.
1 parent 85feda0 commit a71886a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/webapp/tailwind.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,10 @@ module.exports = {
289289
},
290290
focusStyles: {
291291
outline: "1px solid",
292-
outlineOffset: "0px",
292+
// Inset the ring so it is painted inside the element's box. At offset 0 the outline sits
293+
// just outside the border edge and gets clipped by any ancestor with overflow hidden/auto
294+
// (scroll areas, the side menu grid) or covered by an adjacent element's background.
295+
outlineOffset: "-1px",
293296
outlineColor: textLink,
294297
borderRadius: "3px",
295298
},

0 commit comments

Comments
 (0)