-
Notifications
You must be signed in to change notification settings - Fork 717
[css-fonts] Should font-palette: normal look at the color-scheme property? #7783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
First part, responding to one part of your comment: The spec takes into account the color property, but that only indirectly has something to do with color scheme:
The color property is taken into account for the The second part:
The spec has an example:
Are you looking for a tighter integration with color-scheme than via media queries? Are you suggesting, the color-scheme: property should automatically affect the font-palette property somehow? |
Possible approach: define a Perhaps that should even be the initial value, or the behavior of Alternatively, it is of course possible to use media queries. But |
@jfkthame that seems reasonable to me, what do others think. |
Yes, that's how the color-scheme property works. E.g,:
Means that all elements on the page will have light / dark colors based on user preference. But the font-pallete won't change, afaict. Or I guess it'd change by virtue of color-scheme being dark, in which case the text color will be light... But still |
So currently we have
Which explicitly selects the default palette, and only uses the value of
It isn't clear to me exactly how |
That seems reasonable to me.
I don't think it needs any change here, does it? The author is providing a specific custom palette, so that's what should be used. If they want different custom palettes depending on the color scheme, they can still use a media query. |
Yeah, looks good. Should probably have a test for that tho. |
https://drafts.csswg.org/css-fonts/#font-palette-prop has normal / light / dark variants.
The normal description says that UAs should take the color property value into account to choose a dark palette. But these days we also have the color-scheme property, which seems like a stronger hint? It'd be nice if color-scheme worked nicely with this.
cc @jfkthame
The text was updated successfully, but these errors were encountered: