Skip to content

feat(switch): update focus styles and outline knob outline#2797

Closed
abhi-innovaccer wants to merge 2 commits intoinnovaccer:feat-allyfrom
abhi-innovaccer:feat-switch-focus-outline
Closed

feat(switch): update focus styles and outline knob outline#2797
abhi-innovaccer wants to merge 2 commits intoinnovaccer:feat-allyfrom
abhi-innovaccer:feat-switch-focus-outline

Conversation

@abhi-innovaccer
Copy link

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.

  • Merged with latest master branch

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +45 to +46
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);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +97 to +98
outline: 1px solid var(--inverse-lighter);
outline-offset: -1px;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant