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

Add support for unset CSS keyword to getComputedStyle() #3479

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

jsnajdr
Copy link
Contributor

@jsnajdr jsnajdr commented Jan 4, 2023

Add support for the CSS-wide unset keyword when computing styles in getComputedStyle(). An unset value removes any previously set values for the element and forces it to be inherited or have initial value.

A companion PR to #3478, they should probably get merged together. The inspiration for this PR was seeing unset being handled in @testing-library/user-event's closestPointerEventsDeclaration helper.

@domenic
Copy link
Member

domenic commented Jan 7, 2023

Looks great. I'm unclear why this should or should not be merged together with #3478; would something bad happen if we merged and released this before doing #3478 and #3482? I'll hold off for now, but let me know.

@domenic domenic self-assigned this Jan 7, 2023
@jsnajdr
Copy link
Contributor Author

jsnajdr commented Jan 8, 2023

This is fully independent from the other two PRs (#3478 and #3482) and can be merged separately. It will only cause a merge conflict with #3482, because both PR touch the same code, the loop that goes through matching style rules and applies their properties, but that's fine.

@domenic domenic merged commit 8a43fd5 into jsdom:master Jan 10, 2023
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

2 participants