feat(switch): update focus styles and outline knob outline#2797
feat(switch): update focus styles and outline knob outline#2797abhi-innovaccer wants to merge 2 commits intoinnovaccer:feat-allyfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be15e30cf9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| box-shadow: 0 0 0 var(--spacing-05) var(--shadow-0), | ||
| 0 0 0 calc(var(--spacing-05) + var(--border-width-05)) var(--primary-focus); |
There was a problem hiding this comment.
Use tokenized focus shadow variables
The new focus rule hard-codes a full box-shadow recipe in switch.module.css, which violates the repository’s mandatory design-token rule in AGENTS.md (no hard-coded box-shadow rules outside token files) and bypasses the centralized shadow mappings in css/src/variables/index.css; this makes future theme/token updates inconsistent because Switch focus styling will no longer track token-level shadow changes.
Useful? React with 👍 / 👎.
| outline: 1px solid var(--inverse-lighter); | ||
| outline-offset: -1px; |
There was a problem hiding this comment.
Replace literal knob outline pixels with tokens
This introduces fixed pixel values (1px and -1px) for the knob outline, which conflicts with the mandatory design-token guidance in AGENTS.md (“Do not hard-code ... pixel sizes ... outside token files”); using literals here makes Switch sizing less adaptable to token-driven density/scale updates and breaks consistency with the design-system token contract.
Useful? React with 👍 / 👎.
What does this implement/fix? Explain your changes.
update focus styles and outline knob outline
Does this close any currently open issues?
...
Any other comments?
...
Dependent PRs/Commits
...
Describe breaking changes, if any.
...
Checklist
Check all those that are applicable and complete.
masterbranch