-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Different output in node vs in browser? #234
Comments
Looks like for some reason |
Thanks for the insane reply speed. I'm using it inside Vanilla Extract
|
Wait, if HSL was not included at all, it wouldn't know how to do the conversion either. The plot thickens… Are you using the same version in both cases? |
Yes, |
Could I help here any further? Maybe a reproduction vite stack? |
The less tooling that is needed to reproduce it, the better. E.g. can you reproduce it in plain Node? I have never used vanilla-extract or vite, so I'm not sure where to even start debugging this 😕 Oh, what happens if you call |
In 0.4.1 toString expects 0 arguments, but in 0.4.0 setting the format option did basically nothing, the resulting string was the same as without it. |
Hmm, actually I can't reproduce it in pure node, the output is correct as |
https://github.com/mystrdat/colorjs-vanilla-test Barebones vite I'll see if I can reduce it further but given it works in node it does seem somehow related to https://vanilla-extract.style |
Thank you so much for tracking this down! |
@LeaVerou This seems to have some insight vanilla-extract-css/vanilla-extract#899 (comment) |
So to summarize, it seems that the gist of the issue is this bug that's overwriting your |
This may be more of a question than a bug report, but I can't find this in the docs. I'm precompiling my color manipulation so it doesn't bog runtime and I'm getting a different
toString()
output in node vs in browser.Outputs strings
color(hsl 60 100 60)
in node andhsl(60 100% 60%)
in browser. What's the intended way to get the CSS-accepted format in node?The text was updated successfully, but these errors were encountered: