Skip to content

Support for unitless hsl values in Sass #140

Open
@arusahni

Description

@arusahni

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() or hsl(), e.g.:

div {
    color: hsla(149,28,76,1);
}

When css-color encounters the unitless invocation, an error message is raised:

Error detected while processing function <SNR>145_parse_screen[4]..<SNR>145_create_syn_match:
line   20:
E605: Exception not caught: css_color: create_syn_match invoked on bad match data

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions