Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some selectors from tailwindcss kills csso parser with error "Unexpected input" #428

Open
Semdevmaster opened this issue Dec 19, 2020 · 3 comments

Comments

@Semdevmaster
Copy link

Semdevmaster commented Dec 19, 2020

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?

@Semdevmaster Semdevmaster changed the title Any selectors from tailwindcss kills csso parser with error "Unexpected input" Some selectors from tailwindcss kills csso parser with error "Unexpected input" Dec 19, 2020
@Semdevmaster
Copy link
Author

I tested this selector on pure css and it is fully valid. Apparently the problem is in the parser.

@lahmatiy
Copy link
Member

lahmatiy commented Jan 6, 2021

Which version of CSSO do you use? Can't reproduce in the latest version:
image

@Semdevmaster
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants