-
Notifications
You must be signed in to change notification settings - Fork 81
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
Support for unitless hsl values in Sass #140
Comments
Glad you enjoy it 🙂 And I deeply appreciate getting this particular praise – not making users jump through hoops for mere convenience on my part without real benefit to them is one of the values I hold highly, which seems to be eroding everywhere else. (Also sorry I took so long to get back to you!) It definitely shouldn’t raise this error and it should indeed support the unitless version if possible. I’ll take a look. |
Hi, I've hit the same "bug" and it is very annoying when one is picking colors from some online source, for instance. To give an example, I have a lot of variables holding colors defined in HEX, which is a bit inconventient when one wants to change just hue, or just the lightness, ... So I'm converting them to HLS using this online converter, which however gives me the value swithout the |
Dang, I was looking for this when I put in the format-vetting in my fork. I don't know anything about SASS/SCSS, and wasn't able to find it in the docs from a quick glance. I'll have to revisit this. |
First off, thanks for the plugin! It's one of the few that I never really have to worry about breaking on me.
Unfortunately, I've hit a (fun?) edge case that I think could at least be better handled. Sass allows for unitless
hsla()
orhsl()
, e.g.:When css-color encounters the unitless invocation, an error message is raised:
In an ideal world, this plugin would be able to treat the unitless variant the same as the version with units. However, the unitless variant is not valid CSS, so that may pose a challenge. At the very least, would it be possible to suppress the error? Having the entire UI block until I dismiss a message can be cumbersome.
The text was updated successfully, but these errors were encountered: