tree-sitter / tree-sitter-css

CSS grammar for Tree-sitter
MIT License
85 stars 34 forks source link

PostCSS and/or Tailwind's `@apply` support? #17

Closed NullVoxPopuli closed 9 months ago

NullVoxPopuli commented 3 years ago

Hello!

I'm using Tailwind, which supports this syntax:

.selector {
  @apply variable-a meta-variable-b lots-of-combined-properties-c;
}

but with the current parser, I get a squiggly on everything after variable-a

Is PostCSS / varying grammars in scope for tree-sitter-css?

harrisoncramer commented 2 years ago

I'm encountering this same problem. Treesitter fails to parse anything beyond the first value after the @apply directive.

Screenshot from 2022-01-12 17-16-15

megalithic commented 2 years ago

@harrisoncramer @NullVoxPopuli either of you discover fixes or build your own queries for this?

luckasRanarison commented 1 year ago

I can't believe that this issue has been open for 2 years

amaanq commented 9 months ago

There's some basic postcss support now, and I released 0.20.0