Skip to content

node.isColor does not support rgb(a), hsl(a) and color keywords #64

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

Closed
bartveneman opened this issue Feb 5, 2019 · 4 comments
Closed

Comments

@bartveneman
Copy link

bartveneman commented Feb 5, 2019

Feature Use Case

For convenience and accuracy it would be nice if node.isColor would also recognize hsl(), hsla(), rgb(), rgba() and color keyword (blue, yellow) nodes.

Feature Proposal

For @projectwallace/css-analyzer I use this logic to determine whether a node is a color.

@shellscape
Copy link
Owner

Absolutely.

In the future please do use the issue templates.

@bartveneman
Copy link
Author

updated opening comment

@shellscape
Copy link
Owner

Added in 7108d9a. I'll release a new beta shortly.

@bartveneman
Copy link
Author

Whoa, that’s quick!

shellscape added a commit that referenced this issue Mar 3, 2019
* chore: updating metadata, ci, project structure

* chore: starting fresh with a tokenizer

* fix: fix token position for paren and comma splits

* feat: operator node

* chore: license

* chore: additional node support

* test: get numeric tests working

* chore: fix linting

* test: fix local npm audit

* test: punctuation tests

* test: unicode range tests

* refactor: mature the codebase

* fix: operator split regex, remove modulo

* feat: function nodes

* feat: interpolation and variable support

* chore: knocking down errors

* chore: ongoing

* test: add test to cover failed url from #62

* test: add operator tests

* feat: implement type walkers

* fix: hex colors

* fix: oddball word parsing

* test: update snapshots to v2, fix operator before word

* test: improve coverage, weed out dead code

* chore: update dependencies

* fix: numeric units, update snapshots

* fix: modulo operator

* chore: rename atrule, create AtWord

* docs: rewrite docs wip

* docs: wip

* docs: finishing up docs for release

* chore(release): beta2. publish only needed files

* fix: remove global flag from shared regexps. fixes #63

* feat: function.isColor, isColor for color names. fixes #64

* chore(release): beta3

* fix: protocol-relative urls. fixes #65. adds isUrl to Word

* chore(release): 3.0.0-beta.4

* chore: add performance benchmark

* chore: devDep update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants