-
Notifications
You must be signed in to change notification settings - Fork 143
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
[css-properties-values-api] Generally ignore syntax in APIs. #912
Conversation
😿 (but also 🎉) @emilio, can you take a look at this and verify that this is what we want? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not that familiar with the reification stuff, but it looks sane to me. Thanks for doing this :)
Hmmm, losing the reification behavior sucks. :( It means there's no way to interact with, say, a Is there any way we can save this? It'll require flushing style data and be racy with stylesheets, unfortunately. Even if we don't think it's reasonable to salvage |
From the author's perspective, yeah 😿. But a I can't see any good way to solve everything in this case. :( One related thought is that we could allow any object-value through Typed OM (regardless of registration status), and in general allow custom properties to hold any value (not just token streams).
In other words, the underlying value created from |
@tabatkins We will probably need to think outside the box we've created for ourselves to proceed, so here goes: We could make
Let's invent a
Open questions:
|
That sounds not great... What happens if we |
OK.
Yes, no, maybe. I don't know yet.
Note that custom properties must already preserve their exact input for serialization. Naturally this isn't spec'd anywhere. (I'm not implying that this automatically makes this |
Sorry, to be clear I don't try to be harsh, just trying to point out stuff that probably makes something hard. I very much appreciate the work y'all do ^.^ |
😹 I had some ideas for how to deal with |
Or perhaps not allow |
So my issue with reparsing is that it's not only reparsing already-parsed stuff, but also potentially bringing back to life declarations that were overridden. I think "operations such that it would affect values that are already parsed" is also pretty hard to detect for the same reason. So for example, for the case where you have a length property called div {
--foo: 10px; /* This one parses. */
--foo: red; /* Gets dropped at parse-time, I guess? */
} If then I deleteRule the (edit: use css comments, :)) |
Yeah, I know ... we can't do that.
It could be more defensive, like "insertions/deletions of |
I'm ready to merge this; any additional concerns, Anders or Emilio? The end result is just that we can't reify according to a grammar until computed-value time; any specified values show as CSSUnparsedValue like an unregistered property, or |
👍 / 😢 (Mixed feelings, but this is probably for the better).
Just that it annoys me that the path forward to mitigating the TypedOM situation is so unclear right now. Unless you have some new insight to share, Tab?
Don't forget to also undo the change for two-param |
Hey, so long as computed values still reify well, I'm happy enough. The losses are worth gaining |
Done. (In w3c/csswg-drafts@47269f7) |
Yeah, I agree with this sentiment. Thanks for bearing with me y'all :) |
With recent spec issues finally resolved [1], and corresponding adjustments made to Blink and WPT [2][3][4], we can enable this again. [1] w3c/css-houdini-drafts#912 [2] https://crrev.com/88ae629e1ed425385c46369e912ed96baac6c4d9 [3] https://crrev.com/6ce684bfcdfdebf69bd50e5f3e51f48078eb43c8 [4] https://crrev.com/4aa028f816fb7e87194510906d687a7aee26652a I2S: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/QjcyhPZ_sNI/SuB-GuNPDAAJ Bug: 641877 Change-Id: I90874324600cbe268a6c0f2af9b2c772d7e1754a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1718566 Reviewed-by: Yoav Weiss <yoavweiss@chromium.org> Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/master@{#681669}
Resolves #902.