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

Read css vars with getComputedStyle don't work #932

Closed
pserrer1 opened this issue May 23, 2023 · 1 comment · Fixed by #934
Closed

Read css vars with getComputedStyle don't work #932

pserrer1 opened this issue May 23, 2023 · 1 comment · Fixed by #934
Assignees
Labels
bug Something isn't working

Comments

@pserrer1
Copy link

Describe the bug
getComputedStyle don't returns the value of css vars.
This might be related to the fact that CSSStyleDeclarationElementStyle don't store the value of the already evaluated cssVariables inside the PropertyManager.

To Reproduce
Steps to reproduce the behavior:

document.documentElement.style.setProperty("--foo", "1rem")
assert(getComputedStyle(document.documentElement).getPropertyValue("--foo") == "1rem")
@pserrer1 pserrer1 added the bug Something isn't working label May 23, 2023
@capricorn86 capricorn86 self-assigned this May 23, 2023
capricorn86 added a commit that referenced this issue May 23, 2023
…retrieved from an instance of CSSStyleDeclaration retrieved from Window.getComputedStyle() when calling CSSStyleDeclaration.getPropertyValue().
capricorn86 added a commit that referenced this issue May 23, 2023
…getcomputedstyle-dont-work

#932@patch: Fixes issue where CSS variables where not possible to be …
@capricorn86
Copy link
Owner

Thank you for reporting @pserrer1! 🙂

The issue has been fixed.

You can read more about the release here:
https://github.com/capricorn86/happy-dom/releases/tag/v9.20.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants