csso
csso copied to clipboard
Some selectors from tailwindcss kills csso parser with error "Unexpected input"
Example selector:
.sm\:focus-within\:text-opacity-5:focus-within{}
Get in the console:
SyntaxError: Unexpected input
at Object.error (.........\node_modules\css-tree\lib\parser\create.js:240:19)
Try this selector in https://hugogiraudel.github.io/selectors-explained/
no error
Is this a parser problem or is it really selector problem?
I tested this selector on pure css and it is fully valid. Apparently the problem is in the parser.
Which version of CSSO do you use? Can't reproduce in the latest version:

Describe the problem: Example selector: .sm:focus-within:text-opacity-5:focus-within{} Get in the console: SyntaxError: Unexpected input at Object.error (.........\node_modules\css-tree\lib\parser\create.js:240:19)
Link to a minimal reproduction: 1)default config tailwindcss (use only utilities) 2)add postcss plugin "postcss-csso" in postcss.config.js 3)get above error in console