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.
switchWidthandswitchHeight(LibreChat-AI#16486) are each validated withisLengthon their own, so a definition can set a width of0, 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 intailwind.preset.cjswithmax(0px, ...)so a value that slips through cannot go negative.