Open arusahni opened 4 years ago
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 %
signs on lightness and saturation, so when I paste e.e. hsl(224,13,34)
in Vim, I get a first error; then when I add %
to either 13
or 34
I get another error because I've have corrected only one of them.
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.