-
Notifications
You must be signed in to change notification settings - Fork 72
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
preserve-parent-color value for forced-color-adjust CSS property #591
Comments
Related: #463, which I think still has no official position? |
General support was provided in #463, although it wasn't specific to
|
So I'm confused about this value, but mostly I think is because the specified behavior for system colors is not great, see w3c/csswg-drafts#6773. If we decide that system colors do not evaluate at used value time, is this value still meaningful / useful? |
If system colors no longer evaluate at used value time, I think For example, SVGs currently have
As a side note: I'm not sure how this value should act in the case when |
I see. But the whole reason (or at least a big reason) we specified to do forced colors at used-value time was because system colors were specified to resolve at used-value time, right? (see w3c/csswg-drafts#4915 (comment) and co) Gecko right now resolves forced colors at computed-value time, and I think we can deal with transparency in backgrounds (which is what this complexity was all about iirc) somewhat reasonably...
Right, but if As in, I think Firefox renders the explainer as you want / expect: https://crisal.io/tmp/forced-color-adjust-preserve-parent-color.html right? I tried Chrome Canary and I couldn't make
So if I understand correctly, you want
Right, this complicates the whole model even more as you note. I think a simpler model is:
But then this value becomes completely irrelevant / synonym with |
To be clear, I might be missing something about how Edge/Chromium deals with background-colors differently from Firefox. Do you have a test-case where we render differently that I could look at? Maybe that helps justifying all this complexity, but otherwise I think Or, at least, is there any reason |
That played a large role in the decision. Although there were other reasons (see comments here and here). If I understand correctly, then, the proposal in w3c/csswg-drafts#6773 is also, as a side effect, aiming to move forced colors to computed-value time, instead? I think that would re-raise some of the transition issues (#5419), and would make handling the resolution in #4178 somewhat strange (although not impossible).
Chromium originally implemented forced colors at computed-value time with background-color handling, so I don't think that is a major issue. (Although it is slightly cleaner to do at used-value time).
Not unless forced colors happened at computed-value time, as well. If both system color resolution and forced colors happened at computed-value time, then yes,
The reason Firefox renders this correctly is because forced colors is still happening at computed-value time, whereas in Chromium, it is happening at used-value time.
I don't think that's necessarily true. The idea of
Correct, if we were to make forced colors work at computed-value time, then |
Hi @emilio - did your thinking change at all after the discussions in CSSWG last month via w3c/csswg-drafts#6773? Reading through this thread it sounds like you were in favor of:
One of the drawbacks for forcing colors at computed value time is that elements with In my estimation |
Hi @emilio - any updates on your thinking here? |
Hi, sorry, I forgot to reply here. Happy new year btw :-)
Well, yeah, because the author values would be lost at value computation time, right? But I think that's actually a feature, since otherwise you get the kind of contrast issues that we are trying to avoid really easily. I think I'd rather wait for a resolution to w3c/csswg-drafts#6773. I need to chat with @tabatkins about it because I seem to recall we were talking past each other a bit on the call it was discussed. |
Thanks for your response (and belated happy new year as well :) Do you happen to have a rough ETA for discussing with Tab in context of w3c/csswg-drafts#6773? We do know that sites are running into this with our implementation in Chromium (which matches the current spec of 'force at used value time'). Perhaps we could, in the interim, consider changing the default behavior of SVG without having the new property value be web exposed, but hopefully we're not too far from getting consensus on 6773. |
@emilio given the resolution in w3c/csswg-drafts#6773, do you have an updated position on |
@emilio - any additional thoughts here? We'd like to ship preserve-parent-color to address a specific need for authors, given the existing state of forced colors happening at used value time. |
Request for Mozilla Position on an Emerging Web Specification
Other information
The main focus of this review is around the introduction of the
preserve-parent-color
value for the existingforced-color-adjust
CSS property.The text was updated successfully, but these errors were encountered: