-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve color names to hex and vice versa #65
Comments
I think we eventually should have it. Thanks for suggesting. |
It should also support translation from hex.replace(/#([\da-fA-F])\1{5}/, '#$1$1$1'); |
@MayhemYDG - we already do rgb -> hex and color shortening (see specs)! A (lengthy) list of all optimizations is coming soon - see #35. |
Oh all right then. Still missing hsl translation. |
We do hsl too - need that optimizations wiki page urgently :-) |
Uh? I use clean-css via grunt-contrib-cssmin and it's not translating hsl to hex. |
@MayhemYDG please check if you use grunt-contrib-cssmin 0.4.1+ as they only recently bumped clean-css dependency to 0.10.x (we added hsl support in 0.8.3). |
% npm install clean-css
% cat main.css | ../../../node_modules/clean-css/bin/cleancss -o test.css
Usage: cleancss [options] <source-file>
... This doesn't even seem to work? ../../../node_modules/clean-css/bin/cleancss main.css -o test.css It doesn't translate hsl to hex, looks like the issue does come from clean-css. |
@MayhemYDG - I was mistaken by another part of our code which handles HSL/HSLA cleanup. There's a ticket for HSL conversions now: #83. |
Great! |
@MayhemYDG - HSL conversions ready in 8cf8283. |
Good job. |
Thanks! This was a much awaited feature. :) |
👍 |
WhiteSmoke
is bigger than#F5F5F5
and so on.I suggest that most if not all of these colors are supported.
This might be a good starting point: https:/stubbornella/csslint/blob/master/lib/parserlib.js#L943
The text was updated successfully, but these errors were encountered: