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

Support for the CSS Color Module Level 4 (Editor's Draft) #8

Closed
jeddy3 opened this issue Mar 20, 2017 · 2 comments
Closed

Support for the CSS Color Module Level 4 (Editor's Draft) #8

jeddy3 opened this issue Mar 20, 2017 · 2 comments

Comments

@jeddy3
Copy link

jeddy3 commented Mar 20, 2017

It's very exciting to watch so many of the 1.0 roadmap items get ticked-off!

I was wondering if support for the CSS Color Module Level 4 (Editor's Draft) was under consideration, in particular, the color() function (playground here)?

Currently the following CSS:

a { 
  color: color(#eef6f8 alpha(50%));
  border-bottom: 2px solid color(#eef6f8 alpha(30%));
}

Produces the following warnings:

2:2  ✖  Invalid value for `color`   csstree/validator
3:2  ✖  The rest part of value can't to be matched on `border-bottom` syntax   csstree/validator
@lahmatiy
Copy link
Member

lahmatiy commented Mar 20, 2017

Hi, @jeddy3!
Can you move the issue to csstree issues?
In the meantime, let me answer here. In short, it's a bit complicated and therefore postponed for a while (it's good to have an issue still).

CSSTree supports things are supported by browsers first. As I know level 4 is not supported by any browser yet (correct me if I'm wrong). It may be an extension for default syntax still.
I read this module a while ago. While color() looks simple, I found a problem with color-mod syntax. In current form, it's unusual and requires improvements in lexer syntax matcher. Now it is not known exactly that the syntax will be the same in the future (it's a draft). So it's unclear should we do these improvements or not. Supporting for a part of the module looks odd. One more solution to rewrite a color-mod syntax in a regular way and then suggest those changes to the module. But this requires an unknown amount of time. That's why I decided to focus on more obvious things.

@jeddy3
Copy link
Author

jeddy3 commented Mar 20, 2017

@lahmatiy Thanks for the quick response!

Can you move the issue to csstree issues?

Will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants