dperini / nwsapi

Fast CSS Selectors API Engine
MIT License
105 stars 36 forks source link

It does not handle escape backslash for class names correctly #52

Closed AcrylicShrimp closed 1 year ago

AcrylicShrimp commented 2 years ago

Hello! Thanks for this amazing work!

I found that the nwsapi tries to select pseudo-classes when the given class name includes : with preceding \. And this naming pattern is used by famous CSS library tailwindCSS. Is there way to handle correctly?

Thank you!

dperini commented 1 year ago

@AcrylicShrimp no, I don't think this is possible and I also believe it is wrong. In CSS the colon : is the opening character of a named pseudo-class. Escaping the colon : is changing the meaning of it and its associated name. No issue here ... closing it. Please use a forum not a bug report.