Skip to content

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.
@tabatkins
Copy link
Member

Ah, perfect, I'd just noticed this lack when looking at the removed attr() cycle section and checking that I didn't still need the examples.

@tabatkins tabatkins merged commit e6147ce into w3c:main Apr 30, 2025
1 check passed
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.

2 participants