Germán
Germán
KPCKevin Powell - Community
Created by Germán on 12/30/2024 in #front-end
Best approach to support light-dark function
Hi! Does anyone know if one of these options is more appropriate or correct than the other one?
/* 1 */
::placeholder {
color: #757575;
color: light-dark(hsl(0deg 0% 46%), hsl(0deg 0% 65%));
}

/* 2 */
::placeholder {
color: #757575;
}
@supports (color: light-dark(black, white)) {
::placeholder {
color: light-dark(hsl(0deg 0% 46%), hsl(0deg 0% 65%));
}
}
/* 1 */
::placeholder {
color: #757575;
color: light-dark(hsl(0deg 0% 46%), hsl(0deg 0% 65%));
}

/* 2 */
::placeholder {
color: #757575;
}
@supports (color: light-dark(black, white)) {
::placeholder {
color: light-dark(hsl(0deg 0% 46%), hsl(0deg 0% 65%));
}
}
4 replies