Evercoder / Evercoder/culori

[BUG]: uppercase function names, angle units return `undefined`, throw error, respectively

Open
#276 4 comments 0 reactions 0 assignees View on GitHub
Bug Help Welcome
Dominant language
JavaScript
Stars
1.2k
Forks
38
PR merge metrics
No merged PRs in 30d

Description

### Description

Passing in function names and angle units in uppercase causes culori to throw. Uppercase function names and angle units are allowed per the CSS spec.

### Screenshots

Image

### Steps to reproduce

- Open the [culori](https://culorijs.org) site
- Open the browser devtools console
- Enter `culori.parse("RGB(128 0 0)")`
- Note that `undefined` is returned
- Enter `culori.parse("hsl(0DEG 100% 50%)")`
- Note that an error is thrown

### Notes

- The [CSS values spec](https://www.w3.org/TR/css-values-4/#functional-notations) states that function names should be case-insensitive
- The [CSS values spec](https://www.w3.org/TR/css-values-4/#dimensions) states that unit identifiers should be case-insensitive

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.