tree-sitter / tree-sitter-css

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

fix: Restrict `:has`, `:not`, and others to selector arguments #46

Closed savetheclocktower closed 1 week ago

savetheclocktower commented 7 months ago

(fixes #45)

This isn't the elegant solution I was hoping for, but it's the smallest change that I could make work. Since :has, :not, :is, and :where are the only pseudo-classes that take selector arguments, we can prevent the conflict by disallowing plain values inside of those four altogether.

I bet there's a simpler solution, too, but I'm submitting this just in case.

amaanq commented 1 week ago

thank you! sorry for being so behind on reviewing this. just rebased and merged :slightly_smiling_face: