Re: [csswg-drafts] [css-color-adjust] Re-add `only` to mean "don't auto-adjust me", per WebKit's behavior (#5089)

> Some info on auto-darkening in Apple Mail [snip]

Yup, this should all be allowed by the spec text. I think it's important to *eventually* standardize, at least roughly, on what "auto-darkening" means (authors are going to end up depending on the behavior, and having it standardized is thus better for users of browsers the authors didn't test on), but for now it's wide-open. The only requirement is that you *do* apply the "used color scheme" changes exactly as specified, but you can do whatever else you need to the colors/images on the element in addition.

> Some CSS colors ("system colors") are not inverted, but use values supplied by the OS which have specific dark-mode values

Yeah, there's no actual "inverting" specified; I presumed that Chris was using the term generically to mean "switched to a dark-mode set". The "used color scheme" details make it clear that the UA just needs to change the system colors to be appropriate to the chosen color scheme, but puts no restrictions on what those colors might be.

> Images are not inverted and their presence may disable auto-darkening, but this could change in future.

This is allowed; the spec is intentionally very vague about what triggers "override the color scheme", just that the user indicates they have an overriding preference, and the UA *may* do something about it.

> Another nuance in the original proposal which I want to make sure is captured: we didn't want to write it with the assumption that "light" and "dark" would be the only modes available.

Don't worry, the spec is still written generically in this respect, with the assumption that additional color schemes can be added in the future.

> `only` was included to allow the. author to preclude the UA from doing any conversions to modes which they had not specifically authored for.

Yup, that's exactly what it does. The "override the color scheme" behavior can only happen if the author doesn't say "only"; if they do, then they're guaranteed to get a color scheme from the ones they listed (assuming the UA supports one of them), with no adjustments besides the necessary ones specified by the "used color scheme".

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


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

Received on Friday, 21 May 2021 17:22:51 UTC