tree-sitter / tree-sitter-css

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

Attribute arguments scoped as plain_value #6

Closed chbk closed 1 year ago

chbk commented 4 years ago
p[data-foo]::before {
  content: attr(data-foo);
}

The argument passed to attr() should be attribute_name instead of plain_value.

Mozilla documentation.

amaanq commented 1 year ago

we can't determine nodes dynamically at parse time, you can use queries to capture certain patterns and highlight them like an attribute_name instead