Description
It seems there's a problem with the webkit prefixes (leading "-").
I think it should be -webkit-transform
, not webkit-transform
.
The following code shows the issue:
const
cssstyle = require('cssstyle'),
style = new cssstyle.CSSStyleDeclaration();
style.cssText = 'background-color: red; -webkit-transform: scale(2);'
// Be aware: Using "-webkit-transform" with leading "-"
console.log('background-color: ' + style.backgroundColor) // working => "red"
console.log('-webkit-transform: ' + style.webkitTransform) // not working => "" <---------- !!!!
// Be aware: Using "webkit-transform" now, without leading "-"
style.cssText = 'background-color: green; webkit-transform: scale(3);'
console.log('background-color: ' + style.backgroundColor) // working => "green"
console.log('webkit-transform: ' + style.webkitTransform) // working => "scale(3)"
Metadata
Metadata
Assignees
Labels
No labels