Skip to content

[css-variables] Animation tainting text doesn't cover the cases where a property references a tainted property #1737

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

Closed
FremyCompany opened this issue Aug 17, 2017 · 1 comment
Assignees
Labels
Closed Accepted by Editor Discretion Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-variables-1 Current Work Needs Testcase (WPT)

Comments

@FremyCompany
Copy link
Contributor

FremyCompany commented Aug 17, 2017

I don't think the text in the spec covers this example:

div { 
	animation: anim 1s infinite alternate; 
	--var: block; --var2: var(--var);
}

div::after {
	content: "abc";
	display: var(--var2);
}

@keyframes anim {
	to { --var: none; }
}

https://drafts.csswg.org/css-variables/#substitute-a-var

If the custom property named by the first argument to the var() function is animation-tainted [... ignore it in display if it resolves to none ...]

any custom property used in a @keyframes rule becomes animation-tainted, which affects how it is treated when referred to via the var() function in an animation property.

var2 is never used in a keyframes rules so should not be animation tainted

@tabatkins
Copy link
Member

Agreed, animation-taint definitely needs to be infectious.

@tabatkins tabatkins added Closed Accepted by Editor Discretion Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. Needs Testcase (WPT) labels Jul 27, 2021
mfreed7 pushed a commit to mfreed7/csswg-drafts that referenced this issue Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted by Editor Discretion Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-variables-1 Current Work Needs Testcase (WPT)
Projects
None yet
Development

No branches or pull requests

2 participants