Closed togami2864 closed 1 month ago
Hi, Can I work on this?
Absolutely, assigned.
I have a question.
In the process of implementing this feature, I started by creating a function to calculate the specificity of CSS selectors. During this process, I noticed that there is something called CssMetavariable within AnyCssSelector. https://github.com/biomejs/biome/blob/ab0f96ea51a576456a6aa7c439bc292d61a0ec42/crates/biome_css_syntax/src/generated/nodes.rs#L8285-L8291
Since I'm not very familiar with CSS, I'm unsure how to handle the specificity calculation for CssMetavariable. Could you please advise me on how to process the specificity of CssMetavariable?
I found where it is used, but I don't fully understand what it represents. https://github.com/biomejs/biome/blob/ab0f96ea51a576456a6aa7c439bc292d61a0ec42/crates/biome_css_parser/tests/css_test_suite/ok/grit_metavariable/metavar.css.snap#L55-L61
The specificity of selectors should be already available in the semantic model
I completely missed that... Thank you for letting me know!
I realized that the specificity calculation has not been implemented yet. https://github.com/biomejs/biome/blob/d03c6cd029dd273ba6a3a270ab82e7f02b24b8d5/crates/biome_css_semantic/src/events.rs#L201-L207 Is there anyone already working on this implementation? If not, I would like to give it a try.
@tunamaguro I don't think there's someone working on it, you're more than welcome to tackle it
Okay, I'll try it.
Description
Implement no-descending-specificity
Want to contribute? Lets you know you are interested! We will assign you to the issue to prevent several people to work on the same issue. Don't worry, we can unassign you later if you are no longer interested in the issue! Read our contributing guide and analyzer contributing guide.