{"action":"created","issue":{"url":"https://api.github.com/repos/vadimdemedes/dom-chef/issues/23","repository_url":"https://api.github.com/repos/vadimdemedes/dom-chef","labels_url":"https://api.github.com/repos/vadimdemedes/dom-chef/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/vadimdemedes/dom-chef/issues/23/comments","events_url":"https://api.github.com/repos/vadimdemedes/dom-chef/issues/23/events","html_url":"https://github.com/vadimdemedes/dom-chef/issues/23","id":323289602,"number":23,"title":"`CSSStyleDeclaration.setProperty()` doesn't seem to work consistently","user":{"login":"reyronald","id":7514993,"avatar_url":"https://avatars2.githubusercontent.com/u/7514993?v=4","gravatar_id":"","url":"https://api.github.com/users/reyronald","html_url":"https://github.com/reyronald","followers_url":"https://api.github.com/users/reyronald/followers","following_url":"https://api.github.com/users/reyronald/following{/other_user}","gists_url":"https://api.github.com/users/reyronald/gists{/gist_id}","starred_url":"https://api.github.com/users/reyronald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reyronald/subscriptions","organizations_url":"https://api.github.com/users/reyronald/orgs","repos_url":"https://api.github.com/users/reyronald/repos","events_url":"https://api.github.com/users/reyronald/events{/privacy}","received_events_url":"https://api.github.com/users/reyronald/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-15T16:19:01Z","updated_at":"2018-05-15T20:41:58Z","closed_at":null,"author_association":"NONE","body":"Hello! First of all, thank you for creating and maintaining this wonderful package! Now on to the problem..\r\n\r\nThis is interesting because this is an issue that I've encountered only in a browser environment. As far as I have tested, it is not reproduce-able in NodeJs with `jsdom`. The thing is, `CSSStyleDeclaration.setProperty()` doesn't always work apparently?\r\n\r\nIn the Chrome Dev Tools (I used Version 66.0.3359.139 (Official Build) (64-bit) on Windows), run:\r\n\r\n```js\r\nconst label = document.createElement('label')\r\nlabel.style.setProperty('fontSize', '12px')\r\nlabel.style.fontSize // will output \"\", should output \"12px\"\r\n```\r\n\r\n![image](https://user-images.githubusercontent.com/7514993/40069609-d9156f62-5839-11e8-86e8-eb2ff7cbaca7.png)\r\n\r\n\r\nThis is annoying because for some particular CSS properties I am forced to set the style manually without using `dom-chef`. I've read the documentation on `.setProperty` and I can't seem to find any warning of reference that this may happen. I find it specially strange because doing `label.style['fontSize'] = \"12px\"` will actually work! So I'm inclined to think that this is a bug on the browser implementation of `setProperty` itself.\r\n\r\nWhat do you think? Do you have any clue on why this might be happening? Would it be possible to change `dom-chef`'s implementation to use `style.cssPropertyName = 'value';` instead of `setProperty`? Am I missing something?\r\n\r\n```diff\r\nconst setCSSProps = (el, style) => {\r\n  Object\r\n    .keys(style)\r\n    .forEach(name => {\r\n      let value = style[name];\r\n\r\n      if (typeof value === 'number' && !IS_NON_DIMENSIONAL.test(name)) {\r\n        value += 'px';\r\n      }\r\n\r\n-      el.style.setProperty(name, value);\r\n+      el.style[name] = value;\r\n    });\r\n};\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/vadimdemedes/dom-chef/issues/comments/389306366","html_url":"https://github.com/vadimdemedes/dom-chef/issues/23#issuecomment-389306366","issue_url":"https://api.github.com/repos/vadimdemedes/dom-chef/issues/23","id":389306366,"user":{"login":"bfred-it","id":1402241,"avatar_url":"https://avatars3.githubusercontent.com/u/1402241?v=4","gravatar_id":"","url":"https://api.github.com/users/bfred-it","html_url":"https://github.com/bfred-it","followers_url":"https://api.github.com/users/bfred-it/followers","following_url":"https://api.github.com/users/bfred-it/following{/other_user}","gists_url":"https://api.github.com/users/bfred-it/gists{/gist_id}","starred_url":"https://api.github.com/users/bfred-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfred-it/subscriptions","organizations_url":"https://api.github.com/users/bfred-it/orgs","repos_url":"https://api.github.com/users/bfred-it/repos","events_url":"https://api.github.com/users/bfred-it/events{/privacy}","received_events_url":"https://api.github.com/users/bfred-it/received_events","type":"User","site_admin":false},"created_at":"2018-05-15T20:41:58Z","updated_at":"2018-05-15T20:41:58Z","author_association":"COLLABORATOR","body":"Then a successful test would be ok and perhaps an issue can be opened/found on jsdom "}}
{"actor":{"display_login":"bfred-it"}}