Add one focus-visible outline rule for all controls #15
- MA
One rule covering everything focusable, replacing three competing answers and a silence.
Seven call sites swapped a border colour, which moves nothing and is easy to miss on a field that already has a border. Three drew a Tailwind ring. The editor's stylesheet drew an outline. And twenty of the thirty-two buttons in the app answered it not at all, so tabbing through the toolbar showed nothing whatsoever.
An outline rather than a ring or a border: it follows `border-radius`, takes no space in the layout, and paints over whatever it sits on rather than needing a background to sit against. `:where()` gives it zero specificity, so anything needing something different overrides it with a single class and no fight โ which is also why it belongs in the theme rather than in a utility somebody has to remember, the failure mode of a utility being the twenty buttons above.
Seven `outline-none` declarations were suppressing the ring before it existed and are gone.
### Stripping the old declarations by pattern needed care
`focus-visible:ring-ring/40` is a utility with an opacity modifier, and matching only the utility leaves the `/40` welded onto whichever word precedes it. Three sites were affected and they failed differently โ `text-left/40` is not a utility, so Tailwind dropped it and the alignment with it, while `hover:text-foreground/40` and `focus-visible:border-ring/30` are both valid and went on working at reduced opacity, which nothing reports.
`apps/web/src/focus.test.ts` guards the two ways a component can leave the rule again: suppressing the outline, or drawing a second answer beside it.
๐ค Generated with [Claude Code](https://claude.com/claude-code)
---
### Stack
Merge bottom-up. Each PR targets the one below it, so every diff reads in isolation; GitHub retargets the child automatically as each parent merges.
1. #9 โ Emit all theme tokens, fix callout colours, load Inter โ `main` 2. #10 โ Add two-stop shadow scale tokens 3. #11 โ Add radius tokens and replace bare rounded classes 4. #12 โ Add type scale tokens, replace arbitrary font sizes 5. #13 โ Add easing and duration tokens, set transition defaults 6. #15 โ Add one focus-visible outline rule for all controls 7. #16 โ Scale buttons down on press 8. #17 โ Add tabular-nums to figures and balance plan headings 9. #18 โ Shorten empty states and composer status copy 10. #19 โ Add entrance animation for newly arrived items
Plan: `docs/superpowers/plans/2026-08-04-design-token-foundation.md`
MaggieAppletonreferenced this in Emit all theme tokens, fix callout colours, load Inter #93 months ago on GitHub
MaggieAppletonreferenced this in Add two-stop shadow scale tokens #103 months ago on GitHub
MaggieAppletonreferenced this in Add radius tokens and replace bare rounded classes #113 months ago on GitHub
MaggieAppletonreferenced this in Add type scale tokens, replace arbitrary font sizes #123 months ago on GitHub
MaggieAppletonreferenced this in Add easing and duration tokens, set transition defaults #133 months ago on GitHub
MaggieAppletonreferenced this in Scale buttons down on press #163 months ago on GitHub
MaggieAppletonreferenced this in Add tabular-nums to figures and balance plan headings #173 months ago on GitHub
MaggieAppletonreferenced this in Shorten empty states and composer status copy #183 months ago on GitHub
MaggieAppletonreferenced this in Animate newly received messages and status indicators #193 months ago on GitHub
MaggieAppletonbase-ref-force-pushed3 months ago on GitHub
MaggieAppletonhead-ref-force-pushed c768243489823 months ago on GitHub
MaggieAppletonrenamed Say what focus looks like once to Add one focus-visible outline rule for all controls3 months ago on GitHub
MaggieAppletonbase-ref-force-pushed3 months ago on GitHub
MaggieAppletonhead-ref-force-pushed 17585bd0af793 months ago on GitHub
MaggieAppletonbase-ref-force-pushed3 months ago on GitHub
MaggieAppletonhead-ref-force-pushed 604885da4c553 months ago on GitHub
MaggieAppletonbase-ref-force-pushed3 months ago on GitHub
MaggieAppletonhead-ref-force-pushed b659e697d0e03 months ago on GitHub
MaggieAppletonbase-ref-force-pushed3 months ago on GitHub
MaggieAppletonhead-ref-force-pushed 1568a4130f743 months ago on GitHub
MaggieAppletonbase-ref-force-pushed3 months ago on GitHub
MaggieAppletonhead-ref-force-pushed 9154bd610b433 months ago on GitHub
MaggieAppletonbase-ref-force-pushed3 months ago on GitHub
MaggieAppletonhead-ref-force-pushed 47a94fb35e3c3 months ago on GitHub
MaggieAppletonautomatic-base-change-succeeded3 months ago on GitHub
MaggieAppletonhead-ref-force-pushed 2e94a26be3af3 months ago on GitHub
MaggieAppletonmerged 7d56a20819d73 months ago on GitHub
MaggieAppletonhead-ref-deleted3 months ago on GitHub