CSS tip: stop hand-picking a darker hex for every hover state.
.button:hover {
background: color-mix(in oklch, var(--brand), black 15%);
}
Change --brand and the hover shade follows. Works in every modern browser.
CSS tip: stop hand-picking a darker hex for every hover state. .button:hover { background: color-mix(in oklch, var(--brand), black 15%); } Change --brand and the hover shade follows. Works in every modern browser.
0 vue
Publié le 12/11/2026 11:07
CSS tip: stop hand-picking a darker hex for every hover state.
.button:hover {
background: color-mix(in oklch, var(--brand), black 15%);
}
Change --brand and the hover shade follows. Works in every modern browser.
0 commentaire
?