jsdom / cssstyle

A Node.js implementation of the CSS Object Model CSSStyleDeclaration interface
MIT License
107 stars 70 forks source link

feat: Implement read/write of custom properties #111

Closed eps1lon closed 4 years ago

eps1lon commented 4 years ago

Part of #89 which is blocking https://github.com/facebook/react/pull/17896.

I did not implement full support since this requires more work and is only partially useful for JSDOM because resolution of values of the css variables requires the cascade.

Browser behavior: https://codesandbox.io/s/css-custom-properties-access-423ni

jsakas commented 4 years ago

@eps1lon thanks for the PR! I think a lot of folks will be happy about this one.

I will merge and bump to version v2.2.0