You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[upstream #16486] Validate the switch width and height as a pair #201
switchWidth and switchHeight (LibreChat-AI#16486) are each validated with isLength on their own, so a definition can set a width of 0, a height at or under the track's 4px of border, or a width smaller than the height. The preset then derives a zero or negative knob (height - 4px) and a negative checked travel (width - height), and the switch stops reading as a switch.
Validate the pair in packages/data-provider/src/theme.ts (reject, or warn and drop both, when the height is not above 4px or the width is below the height), and clamp the two derived utilities in tailwind.preset.cjs with max(0px, ...) so a value that slips through cannot go negative.
Already fixed on dev. The pair validation landed with LibreChat-AI#16486 (f51b1a8): collectSwitchIssues in packages/data-provider/src/theme.ts rejects a mixed-unit pair, a height at or under the 4px track border and a width not above the height (specs in packages/client/src/theme/registry.spec.ts, e.g. 'switchWidth must exceed switchHeight so the knob can travel'), and tailwind.preset.cjs derives theme-switch-thumb and theme-switch-travel through max(0px, ...). Verified on dev abed1a2.
Activity
berry-13 commentedon Oct 6, 2026
Already fixed on dev. The pair validation landed with LibreChat-AI#16486 (f51b1a8):
collectSwitchIssuesin packages/data-provider/src/theme.ts rejects a mixed-unit pair, a height at or under the 4px track border and a width not above the height (specs in packages/client/src/theme/registry.spec.ts, e.g. 'switchWidth must exceed switchHeight so the knob can travel'), and tailwind.preset.cjs derivestheme-switch-thumbandtheme-switch-travelthroughmax(0px, ...). Verified on dev abed1a2.