Skip to content
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

Cover 100% of properties & values accurately #5

Open
ben-eb opened this issue Mar 16, 2016 · 4 comments
Open

Cover 100% of properties & values accurately #5

ben-eb opened this issue Mar 16, 2016 · 4 comments

Comments

@ben-eb
Copy link
Owner

ben-eb commented Mar 16, 2016

Need to improve parsing & the code generator to be able to handle the more complex grammars, such as <color>.

@zephraph
Copy link
Collaborator

zephraph commented Aug 2, 2016

How could I go about trying to tackle this?

@ben-eb
Copy link
Owner Author

ben-eb commented Aug 2, 2016

I've changed a lot about how this works now, hopefully it's less magical! For color specifically, I think it would be better to have a function that could validate any colour. So, we can start with

"color": "&lt;rgb()&gt; | &lt;rgba()&gt; | &lt;hsl()&gt; | &lt;hsla()&gt; | &lt;hex-color&gt; | &lt;named-color&gt; | currentcolor | &lt;deprecated-system-color&gt;",
as a reference point; we need to be able to validate each of these value types (except the deprecated system colours, not bothered about supporting those).

So once we have an isColor validator, we'll need to have a special case in the property generator, as currently each of the validators accept a value rather than a node from postcss-value-parser. Perhaps that warrants changing first?

#8 is a good starting point if you want to get stuck in.

@ben-eb
Copy link
Owner Author

ben-eb commented Aug 5, 2016

ac7a06c adds support for <color>.

@zephraph
Copy link
Collaborator

zephraph commented Aug 5, 2016

you're fast >_>

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