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) #46
Comments
I figured as much!
Agreed.
A sensible approach :)
I think the 4 and 8 digit hex values bit of the level 4 spec has some upcoming browser support. I haven't seen any mention of the other bits like
I'm pretty ignorant of the inner workings of the parser, so forgive me if this isn't feasible, but would it be possible to skip over the contents of the What I'm asking is, would it be feasible to introduce an
That makes complete sense. From a stylelint user's perspective, not having support for these Editor Draft specs isn't necessarily a blocker to using
|
Yep, it's supported by last browsers with the exception of Edge. Therefore it's supported by csstree lexer. Also commaless
Lexer uses syntaxes described with a grammar defined by CSS Values and Units Module Level 3. You can see how
The hard place here is that functions start is grouped and the closing parenthesis belongs to any of function. Since lexer builds an AST for syntaxes and represents a function as a single node, it should be changed to handle this case. But I don't how, should it generates two function nodes with the same content or a single node with a list of names. Both solutions look abnormal.
Yes, we can add some ignorance or so. As an option is to define
Well, I want to quote stylelint docs: var csstree = require('css-tree');
var mySyntax = csstree
.fork(CssColorLevel4)
.fork(CssModules)
// and so on
mySyntax.validate(csstree.parse(css)); API is subject to change, but an idea should be clear. |
Thank you for taking the time to explain how things work! I've a much better understanding now.
Yep, I agree with you.
Definitely. We wrote that CSS Processors docs around the time when the number of PostCSS (language extension) plugins exploded, and we realised that we needed to draw a line somewhere.
That sounds awesome! I'll wait patiently :) |
Starting with v1.0.0-alpha.30, processing of syntax definitions like
I believe, issue can be closed now. |
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:
Produces the following warnings:
@lahmatiy's response:
Migrated from csstree/stylelint-validator#8.
The text was updated successfully, but these errors were encountered: