Use HSL (Hue, Saturation, Lightness) components in CSS variables to create easily adjustable themes for input states, such as :focus.
By defining the hue, saturation, and lightness separately, you can programmatically or manually adjust the color of the focus state while maintaining consistent saturation and lightness levels.
:root {
--input-border: #8b8a8b;
--input-focus-h: 245;
--input-focus-s: 100%;
--input-focus-l: 42%;
}
/* Example usage for a focus state */
.input:focus {
border-color: hsl(var(--input-focus-h), var(--input-focus-s), var(--input-focus-l));
}