-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
A common pattern to create light and dark theme is to define variables like the following:
@media (prefers-color-scheme: light) {
:where(html) {
--neutral-0: var(--gray-0);
--neutral-1: var(--gray-1);
/** ...and so on... */
--neutral-11: var(--gray-11);
--neutral-12: var(--gray-12);
}
}
/** For dark theme, define values in the "opposite" order */
@media (prefers-color-scheme: dark) {
:where(html) {
--neutral-0: var(--gray-12);
--neutral-1: var(--gray-11);
/** ...and so on... */
--neutral-11: var(--gray-1);
--neutral-12: var(--gray-0);
}
}This doesn't work very well with the current palette. You can see here, that while var(--gray-1) is clearly visible on white background, var(--gray-11) is not clearly visible on the black background.
Btw, I think a similar problem can be observed in your article:
Here, on black background the rectangles "8" and "9" are defined well, but on the white background they're indistinguishable:


I am not sure this is something that can be fixed in a general way, but if it's possible, it would be quite helpful!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels