fix(web): replace double-outline focus style with thicker border#111
Conversation
The global :focus-visible outline (2px + 2px offset) stacked on top of component borders, creating an ugly double ring on inputs, buttons, and the modal close button. Switch to a 2px border on focus instead, with padding compensation to prevent layout shift. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Quick task completed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Align Pencil design with implementation: focused input fields now show 2px border instead of 1px to match the thicker single-border focus style. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WalkthroughQuick task 012 completion (replacing double-outline focus styles with 2px single borders) is documented in planning files. Corresponding CSS changes applied to dialog inputs, buttons, and modal close controls. Design file stroke thickness updated to match the focus styling modifications. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@apps/web/src/styles/modal.css`:
- Around line 96-100: Update the `.modal-close:focus` rule to use
`.modal-close:focus-visible`, add padding compensation to offset the
border-width increase (match the pattern in `dialogs.css` e.g. reduce padding by
1px via calc(...) so the element doesn't shift), include the green glow by
adding `box-shadow: var(--glow-green)` and ensure `border-color` and
`border-width` are included in the element's `transition` so the border change
animates; if `box-sizing` is not already `border-box` on `.modal-close`, set it
or adjust padding compensation accordingly.
🧹 Nitpick comments (2)
apps/web/src/styles/dialogs.css (2)
71-77: Input focus uses:focus— consider:focus-visiblefor consistency.
.dialog-input:focusworks fine functionally. However,.dialog-buttonuses:focus-visible(line 143), and.modal-closealso targets focus. Using:focus-visibleconsistently across all three elements would be more predictable —:focusfires on mouse clicks too, which may show the thick green border unexpectedly when clicking the input. This is a minor consistency point; inputs often do use:focusintentionally since they remain focused during typing.
83-85: Pre-existing: legacyrgba()notation.Lines 85 and 190 use legacy comma-separated
rgba(239, 68, 68, 0.4)syntax. Per coding guidelines, modern space-separated notation is preferred:rgb(239 68 68 / 40%). These aren't changed in this PR, so flagging as a follow-up.As per coding guidelines: "Always use modern space-separated color function notation instead of legacy comma-separated syntax."
fix(web): improve modal-close focus styling per PR review - Use :focus-visible instead of :focus for keyboard-only indication - Add box-shadow glow effect matching other dialog components - Include border-color/border-width in transition for smooth animation https://claude.ai/code/session_012usW3MQ2WzoKPan778WZb2 Co-authored-by: Claude <noreply@anthropic.com>
Summary
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit