jsdom / cssstyle

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

Adds CSS Color Module 4 colors and hsl(a) #74

Closed bennypowers closed 5 years ago

bennypowers commented 5 years ago

fixes #48

fatfisz commented 5 years ago

Great work! Would you be willing to modify it a bit - because having a big switch statement like that is unwieldy - by adding a script similar to the ones existing in scripts/? The output would be a JSON file with an array containing all the scraped colors (the source being https://www.w3.org/TR/css-color-4/ if I'm not mistaken).

bennypowers commented 5 years ago

Well i already scraped the colours (and I don't think colors module 4 will change) , so do you want me to just create that file in lib/named_colors.json?

bennypowers commented 5 years ago

Ok @fatfisz see if latest changes suit your liking

fatfisz commented 5 years ago

Ok, let's go with that. I'll need to adapt the parser anyway because of var(), but it will be better done as a separate change, because rgb and rgba will be affected too.

bennypowers commented 5 years ago

Awesome. Please advise when released, since they're waiting on this in https://github.com/GoogleChrome/lighthouse/issues/7139

fatfisz commented 5 years ago

Sure. I just became a contributor to add some stuff that I need at work (and help with some tidying up), so I'm driven to get the new release out quickly :) Expect it under a week or so.

bennypowers commented 5 years ago

👋 Just a friendly bump. any chance we can cut a release?

fatfisz commented 5 years ago

Hi, I did what I could, now we're waiting for the release (I don't have permissions). Thanks for your patience, this should be released soon!

jsakas commented 5 years ago

@bennypowers @fatfisz v1.2.0 is published to npm.

Thanks for your help!