-
-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Did you check existing issues?
- I have read all the tree-sitter docs if it relates to using the parser
- I have searched the existing issues of tree-sitter-css
Tree-Sitter CLI Version, if relevant (output of tree-sitter --version
)
No response
Describe the bug
CSS' attr()
function has an updated syntax, which allows developers to define the type when parsing the value of an attribute:
inline-size: attr(data-progress type(<percentage>), 0%);
https://developer.mozilla.org/en-US/docs/Web/CSS/attr
Currently, when tree-sitter-css parses a CSS file, the <
and >
in the following line cause a warning:
@supports (inline-size: attr(data-progress type(<percentage>), 0%)) {
Invalid CSS from line A column B to line X column Y
Steps To Reproduce/Bad Parse Tree
Parse the following code:
@supports (inline-size: attr(data-progress type(<percentage>), 0%)) {
.progress-bar {
inline-size: attr(data-progress type(<percentage>), 0%)
}
}
Expected Behavior/Parse Tree
The parser should not emit a warning.
Repro
@supports (inline-size: attr(data-progress type(<percentage>), 0%)) {
.progress-bar {
inline-size: attr(data-progress type(<percentage>), 0%)
}
}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working