jsdom / cssstyle

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

"webkit-*" vs "-webkit-*" #70

Open mcjazzyfunky opened 6 years ago

mcjazzyfunky commented 6 years ago

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)"
nyroDev commented 1 year ago

This issue should be fixed with #112

haohongyang1 commented 3 weeks ago

Hi, I have encountered the same issue in the latest versions of JSDOM and CSSStyle. What is the solution to this problem? @nyroDev Looking forward to your reply, thank you

nyroDev commented 3 weeks ago

@haohongyang1 I did #166 to fix it, waiting for merge.

haohongyang1 commented 3 weeks ago

@haohongyang1 I did #166 to fix it, waiting for merge.

Hi @nyroDev I noticed that MR https://github.com/jsdom/cssstyle/pull/166 was created in 2023. Do you have an estimated timeline for when it might be merged? Thank you for your efforts on this!

nyroDev commented 3 weeks ago

@haohongyang1 You should ask the maintainer @domenic

domenic commented 3 weeks ago

I am not the maintainer for this library. It's not really maintained; we've had some people join the maintainer team once in a while, but they don't seem to be active anymore. We're seeking someone who is willing to maintain it.

In the meantime, sometimes I do small bugfix releases out of general guilt, but you should not expect reviews.