-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Container query support for styled-jsx #311
Comments
I have exactly the same need but did not managed to make it work, @jarrett-pon-ziffdavis could you please share what you did to make container queries work with styled-jsx? I pulled the example that you provided but it's not working on my side... |
@angeblecon I'll provide more details! When I tried to minify stylis I received an error regarding screw ie8. To resolve this I set the uglify-js dependency to 3.2.2 (instead of ^3.2.2). There must be a more recent minor version that removes this flag option. (If I were to open a PR, I'd resolve this issue differently but I'm just trying to get container queries to work). Here is an updated diff: I set the version to As you can see styled-jsx is now using the stylis version I've made through the tar file. In styled-jsx, install/update packages and build the packages. Lastly I run |
I am currently using next.js with styled-jsx. I am looking to use container queries in styled-jsx however styled-jsx is still a major version behind stylis most current version. I found some threads on this but it appears there has been no desire for styled-jsx to update.
One solution is to build off the old major version (3.5.4) and add container query support. Here is an example:
https://github.com/thysultan/stylis/compare/v3.5.4...jarrett-pon-ziffdavis:stylis:add-container-query?expand=1
I have tested this update and also tested using this update in styled-jsx.
I did try to update stylis to the most recent version in styled-jsx with success. However I believe there is undesired behavior that happens when I updated testing snapshots. Updating stylis old major version is not ideal but does solve the problem.
The text was updated successfully, but these errors were encountered: