Replies: 2 comments
-
We currently validate that selectors in We don't do any validation on global selectors, though, so that's probably a good idea just to check that they're valid CSS. I wouldn't attempt to do this with TypeScript—doesn't sound very practical for us to write a selector parser out of template literal types. I'd leverage the selector parser we're already using. |
Beta Was this translation helpful? Give feedback.
-
At least checking pseudo selectors on typos, may be? Full string validation is not possible ofc |
Beta Was this translation helpful? Give feedback.
-
Currently, there is no any (compile-time or emit-time) checking of selector string correctness. Latest typescript can check it with template string types, but maybe it's better to create (or use existing, if any) some util to form selector string? And certainly string should be checked when css emitted.
Beta Was this translation helpful? Give feedback.
All reactions