-
Notifications
You must be signed in to change notification settings - Fork 141
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
Dependency Cycles via Relative Units with unit algebra #1080
Comments
Hm, indeed. I think the solution is just to remove the "length or length-percentage" condition (replace it with a "not *" condition, probably), so we add those edges any time the relevant values are used. |
Actually we need more than that, because https://drafts.css-houdini.org/css-properties-values-api/#dependency-cycles isn't really addressing the problem with lengths: @property --foo {
syntax: "<length>";
inherits: false;
initial-value: 0px;
}
div {
--foo: 10ex;
font-weight: calc(var(--foo) / 1px);
} The |
Following w3c/csswg-drafts#8169 (comment), I guess we should add an edge to every "font-* property (and anything else that affects font selection)". |
#315 was fixed without considering "unit algebra". CSS Values 4 allows dividing by dimensions, so we may have
That's a dependency cycle! It's not addressed by https://drafts.css-houdini.org/css-properties-values-api/#dependency-cycles, since that only handles registered properties with a syntax of
<length>
or<length-percentage>
.The example above uses
<number>
, but other dimensions like<angle>
are also affected:CC @tabatkins
The text was updated successfully, but these errors were encountered: