Skip to content

[css-values-5] All participants in a cycle become invalid #12070

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andruud
Copy link
Member

@andruud andruud commented Apr 11, 2025

The current spec only remembers that we're in a cycle at the single point we're checking for cycles (step 1 of "substitute arbitrary substitution function"). This is not enough:

--x: var(--y, 1);
--y: var(--x, 2);

The current spec would produce computed values of --x:2 and --y:1, which doesn't make sense: if --x and --y indeed have non-invalid computed values, then the fallbacks should not have been taken in the first place.

I believe this is an unintended side effect of
f7a0776, therefore this PR restores the original behavior of making all properties in a cycle invalid.

The current spec only remembers that we're in a cycle at the single
point we're checking for cycles (step 1 of "substitute arbitrary
substitution function"). This is not enough:

 --x: var(--y, 1);
 --y: var(--x, 2);

The current spec would produce computed values of --x:2 and --y:1,
which doesn't make sense: if --x and --y indeed have non-invalid
computed values, then the fallbacks should not have been taken
in the first place.

I believe this is an unintended side effect of
f7a0776, therefore this PR restores
the original behavior of making all properties in a cycle invalid.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant