Skip to content
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

Updates to resolve CSS var() #3299

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

hughes-ch
Copy link
Contributor

Implements this spec:
https://drafts.csswg.org/css-variables-1/

Includes standard substitution, dependency cycles, and inheritance. I've hooked in the new css/css-variables WPT tests directory and made sure I didn't cause any new failures. Still looks like there's some work to do regarding parsing custom properties and the "var()" function in cssstyle. I've added notes to to-run.yml in places where I was pretty sure the problem was there.

This pull request can be standalone, but it probably works better if it's included with one of these requests from cssstyle:
jsdom/cssstyle#127
jsdom/cssstyle#140

@AshConnolly
Copy link

Would love if this got approved! 🙏

@raymondwang
Copy link

Any updates here? I've run into this issue as well, and would love to be able to stop using my workaround.

@hughockey
Copy link

@raymondwang I'm running into this issue too, I'm curious, what is your workaround?

@raymondwang
Copy link

raymondwang commented Oct 11, 2022

@hughockey I had something else in mind when I first left that comment (pulling the resolved variable value from the element and setting the value of the variable directly onto the element, and using a MutationObserver to keep the value in sync), but ultimately I ended up just spying on document.documentElement.style.setProperty.

@louia
Copy link

louia commented Mar 16, 2023

Any news ?

@effervescentia
Copy link

any progress here? I'm planning on adopting vanilla-extract for a new project but it heavily relies on CSS variables for dynamic styling which then renders those aspects of the styling untestable through RTL + jsdom

@nirzafran
Copy link

any updates on this? this PR is like 2 years old

@mrpinkcat
Copy link

I would be interested in any news on the subject.

@theMasix
Copy link

theMasix commented Feb 2, 2024

Any update here? It's been 2 years since opening this PR!

@EdgarKisman
Copy link

Also waiting for the merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants