-
-
Notifications
You must be signed in to change notification settings - Fork 0
CSS AST #3
Comments
Hello there! Thanks for the intro, Titus. I agree that the biggest hurdle in doing this would be justifying the introduction of a brand new toolchain in a world where postcss already has a huge ecosystem and community. I made I've got a bunch of other random thoughts, but just wanted to float that first for y'all to chew on. What do you think? |
My first thought is that I'm super interested in all those other random thoughts of you! 👍 And stylegrep is coool! |
Sounds good. 👍 |
My main worry how a i {
color: blue;
} Would parse, since it could have {
"type": "rule",
"selector": "a i",
"nodes": [{
"type": "decl",
"prop": "color",
"value": "blue"
}]
} |
Sorry, I got distracted this week! I still owe you two some other thoughts. Quickly, though: I actually like that |
Thanks for starting the discussion @wooorm ! |
Shawn did some early work mapping a CSS (sass, scss, less, ...) syntax tree to unist in sast. Maybe we can standardise it into it’s own re* ecosystem? It’s based on gonzales.
Now, making an organisation around this isn’t very hard, as @ChristianMurphy recently showed with redot. Creating an ecosystem with useful plugins is and that takes up a lot of time. A few years ago I created rehype because I wanted to lint HTML. Parsing HTML isn’t very hard, so creating the processor was relatively easy. Validating HTML is. And I still haven’t been able to finish the linting plugin.
So, although I think this is super interesting, and some of the ground work is done already, I’m wondering:
/CC @shawnbot @ChristianMurphy
The text was updated successfully, but these errors were encountered: