Skip to content

[NO-ISSUE] feat(webkit): switch contrast, concentric radius & theme-stable handle#799

Open
gab-az wants to merge 1 commit into
mainfrom
feat/switch-design-enhancements
Open

[NO-ISSUE] feat(webkit): switch contrast, concentric radius & theme-stable handle#799
gab-az wants to merge 1 commit into
mainfrom
feat/switch-design-enhancements

Conversation

@gab-az

@gab-az gab-az commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Design enhancements to the Switch component (inputs/switch), addressing a dark-mode contrast bug and aligning shape with the token system.

  • Dark-mode contrast fix (checked state). The on-state handle previously used --bg-canvas and the lock icon --accent-contrast; in dark mode both resolved to black, so the lock icon (and the knob itself) had no contrast. The checked handle now uses --color-base-white and the lock icon --color-base-black — theme-independent base primitives, so the white knob + black lock stay fixed and legible in both light and dark.
  • Checked track color moved to --accent (was the stale --success-contrast green).
  • Shape / concentric radius. Track uses rounded-[var(--shape-elements)] (6px); handle uses rounded-[var(--radius)] (4px), concentric with the track (6px track − px-0.5 2px inset).
  • Spec updated (.specs/switch.md): Tokens table + Theme gaps reflect the above; body checksum recomputed.

Notes

  • No public API change — props, events, slots, and exports are unchanged (not breaking).
  • The two theme-independent colors are intentional base primitives; a follow-up TODO is recorded in the spec's Theme gaps to promote them to semantic --fg-handle-on tokens.
  • Verified: validate-spec-compliance, validate-tokens, ESLint, and vue-tsc type-check all pass. Full Storybook build not run locally.

@gab-az
gab-az requested a review from a team as a code owner July 25, 2026 15:04
@robsongajunior
robsongajunior enabled auto-merge (squash) July 26, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants