-
Notifications
You must be signed in to change notification settings - Fork 716
[css-typed-om-1] Should css typed om support the same simplifications as css-values-4? #9451
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
Comments
Reading the specs, this is what it looks like to me:
However:
So this means:
This is a mess, but I think we can make it more sane if we do one of the following:
In any case, preserving cc @tabatkins |
The behavior is well-defined across the specs. Simplification occurs at parse-time, and when transitioning between some value stages (specified->computed, computed->used). Typed OM represents a value at one of these stages; whatever the form is at that moment is what it should be reflected as in the Typed OM. If you build one yourself, no simplification happens on the object graph (but once you assign it to a property, the internal value will be simplified as normal). (The "create an internal representation" algo in Typed OM is a bit too handwavey, and could use some editorial tweaking, tho. I'll untag this from Values and leave it as a Typed OM issue.) |
OK, it sounds like you're really expecting the creation of an internal value (whether that comes from parsing or typed-om or something else) to invoke simplify a calculation tree. Currently, only parsing invokes that, so we're bypassing it with typed-om (for specified values). We can currently also bypass sorting if we reify via typed-om and serialize the CSSStyleValue. Is that intentional? |
Can you assign this to me! |
So, the question is should https://drafts.css-houdini.org/css-typed-om-1/ support the same simplifications (like distributing multiplication over sum and sorting the dimensions alphabetically) as css-values-4? Like https://drafts.csswg.org/css-values-4/#calc-simplification and https://drafts.csswg.org/css-values-4/#sort-a-calculations-children?
The text was updated successfully, but these errors were encountered: