jsdom / cssstyle

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

`CSSStyleDeclaration.setProperty()` should NOT apply styles for camelCased property names #60

Closed reyronald closed 6 years ago

reyronald commented 6 years ago

According to the official spec, CSSStyleDeclaration.setProperty()'s propertyName parameter is the CSS property name in hyphen case/dash-case. The current implementation sets the style for camelCase names too, which is not consistent with the browser behavior.

This isn't a nit-pick, it's an actual issue that's bleeding into JSDOM and causing unexpected behavior in testing environments for me, and I'm sure for other users too.

I'm willing to fix this myself, would you accept a PR ?

image

image