Re: [csswg-drafts] [css-fonts] Should font-palette: normal look at the color-scheme property? (#7783)

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:

> User-agents should take the computed value of the color property into consideration when a color font format requires use of the foreground color.

The color property is taken into account for the `0xFFFF`-indexed color references in the font (the font can use indexes into the CPAL table, or a special value 0xFFFF for an application specific foreground color). In other words, a COLRv0 or COLRv1 font can use the surrounding foreground color to color the glyph. If the color property changes due dark mode, then this is reflected in the foreground colored glyphs in the font.

The second part:

> It'd be nice if color-scheme worked nicely with this.

The spec has an example:

```
@media (prefers-color-scheme: dark) {  .banner {font-palette: dark;
  }
}
```

Are you looking for a tighter integration with color-scheme than via media queries? 





-- 
GitHub Notification of comment by drott
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7783#issuecomment-1271488400 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 7 October 2022 11:47:41 UTC