Skip to content
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

Forced Colors Mode #463

Open
alisonmaher opened this issue Dec 10, 2020 · 5 comments
Open

Forced Colors Mode #463

alisonmaher opened this issue Dec 10, 2020 · 5 comments
Labels
w3c Specifications in W3C Working Groups.

Comments

@alisonmaher
Copy link

Request for Mozilla Position on an Emerging Web Specification

Other information

Given that a version of Forced Colors Mode has already shipped in Gecko, the main focus of this review is around the MQ and CSS aspects of the Forced Colors Mode feature.

@emilio
Copy link
Collaborator

emilio commented Dec 10, 2020

cc @MReschenberg

@emilio
Copy link
Collaborator

emilio commented Dec 10, 2020

So to be clear this is about:

Regarding the general feature, I think we're generally supportive. As you said Gecko is already shipping and has shipped for a long time something like this, based on computed-value-time adjustments / revert rather than used-value-time adjustments as the latest draft requires.

I think my main concerns about the used-value time adjustments are:

Regarding the media queries, I think my main concern is w3c/csswg-drafts#5433. I think that that duplication is quite unfortunate, but I don't think we reached a conclusion at TPAC.

Do you know what does Chromium plan to ship wrt the media queries? It'd be nice if we resolved on that issue before those media features get shipped on Chromium...

@emilio
Copy link
Collaborator

emilio commented Dec 10, 2020

I filed w3c/csswg-drafts#5779 on the above, and w3c/csswg-drafts#5778 on something else I noticed while thinking about that :)

@alisonmaher
Copy link
Author

Thanks Emilio! I appreciate the feedback. Regarding your questions and concerns:

User stylesheets not getting respected if they don't use system colors (which sounds actually quite a bit annoying?).

Yeah that's a good point, although user stylesheets could also use forced-color-adjust: none to accomplish this when appropriate.

That it depends on the resolution of w3c/csswg-drafts#3847, but we left that with a TODO about interpolation. We then decided that color-mix was the tool for interpolation in w3c/csswg-drafts#5392, but that doesn't seem implemented in Chromium, so I'm confused about what y'all do there. Do you know what does Chromium do when you get asked to interpolate one system color and another color? Do you eagerly resolve it? (that might be a reasonable solution in the interim)

@kbabbitt has been working on the implementation of system colors computing to themselves, so he can probably fill in some of the details that I miss here. However, it sounds like we are currently resolving the keywords eagerly during interpolation. Kevin is planning to open a CSSWG issue around this to clarify the expected behavior.

In any event, we had implemented the move of forced colors to used-value time such that it wasn't dependent on the system colors computing to themselves feature shipping. We are currently storing both the keyword and resolved value for system colors to accomplish this at used-value time while the system color work is still underway.

Regarding the media queries, I think my main concern is w3c/csswg-drafts#5433. I think that that duplication is quite unfortunate, but I don't think we reached a conclusion at TPAC.

Do you know what does Chromium plan to ship wrt the media queries? It'd be nice if we resolved on that issue before those media features get shipped on Chromium...

As a part of shipping Forced Colors Mode, we are planning to ship the forced-colors media feature. Based on the issue you referenced, it was pretty clear that there was at least consensus on keeping that MQ. In regards to prefers-contrast, the plan is to ship that at a later point in time once that issue has been resolved.

@kbabbitt
Copy link

That it depends on the resolution of w3c/csswg-drafts#3847, but we left that with a TODO about interpolation. We then decided that color-mix was the tool for interpolation in w3c/csswg-drafts#5392, but that doesn't seem implemented in Chromium, so I'm confused about what y'all do there. Do you know what does Chromium do when you get asked to interpolate one system color and another color? Do you eagerly resolve it? (that might be a reasonable solution in the interim)

@kbabbitt has been working on the implementation of system colors computing to themselves, so he can probably fill in some of the details that I miss here. However, it sounds like we are currently resolving the keywords eagerly during interpolation. Kevin is planning to open a CSSWG issue around this to clarify the expected behavior.

Correct, currently the code eagerly resolves system colors to used values for interpolation. I had tossed out the idea of using color-mix() for the interpolated value in w3c/csswg-drafts#5392 but I don't know that it actually got agreed to. I opened w3c/csswg-drafts#5780 to get this clarified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
w3c Specifications in W3C Working Groups.
Projects
None yet
Development

No branches or pull requests

4 participants