less / less/less.js

Invalid color to function throws `color.toHSL is not a function`

Open
#3,343 3 comments 0 reactions 1 assignee View on GitHub

@matthew-dean is already working on this.

Since Feb 12, 2019.

bug medium priority
Dominant language
JavaScript
Stars
17k
Forks
3.4k
Avg merge
7h 42m
Merged PRs (30d)
26

Description

See: https://github.com/mediafreakch/less-plugin-sass2less/issues/1#issuecomment-414817753 and #3338.

It looks like rather than throwing an error when an argument to a color function is not valid, some recent changes instead throw a color.toHSL conversion error, which confuses stylesheet authors. It seems it's still valid to throw an error, it's just the wrong error.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.