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

Container Queries Plugin Crashes WordPress Editor #61

Closed
bruchh opened this issue Aug 16, 2023 · 10 comments
Closed

Container Queries Plugin Crashes WordPress Editor #61

bruchh opened this issue Aug 16, 2023 · 10 comments
Labels
Type: Upstream Issues with upstream dependencies

Comments

@bruchh
Copy link

bruchh commented Aug 16, 2023

Hi,

I enabled the container queries plugin in tailwind.config.js and noticed that the styles in the wordpress editor were no longer applied. Deactivating the plugin fixed the issue.

Here's the error message: Error while traversing the CSS: Error: undefined:848:3: missing '}'

I'm using wordpress 6.3 and the latest version of underscoretw.

@gregsullivan
Copy link
Owner

Hello—thanks for posting this!

Have you already made the changes suggested here:

#60

Please let me know about the above, and we can go from there!

@bruchh
Copy link
Author

bruchh commented Aug 16, 2023

I made the suggested changes but the editor still breaks.

@gregsullivan
Copy link
Owner

Could you run npm run dev, reload the editor, and then share the CSS in your style.css file around the line flagged in the error?

@gregsullivan
Copy link
Owner

It looks like this is an issue with the block editor itself. This appears to be the relevant pull request:

WordPress/gutenberg#49915

It was merged last week, which I believe puts it on track for WordPress 6.4.

Please let me know if you think something else is at play here; in the meantime, I'm going to consider whether I can conditionally exclude container queries from the CSS output from the editor, or whether this is better addressed via documentation.

@gregsullivan gregsullivan added the Type: Upstream Issues with upstream dependencies label Aug 17, 2023
@bruchh
Copy link
Author

bruchh commented Aug 17, 2023

Could you run npm run dev, reload the editor, and then share the CSS in your style.css file around the line flagged in the error?

It's the third line with the font weight:
.prose :where(code):not(:where([class~="not-prose"] *)) {
color: var(--tw-prose-code);
font-weight: 600;
font-size: 0.875em;
}

I think you're right and it's an issue with the block editor.

@scheinercc
Copy link

I'm going to consider whether I can conditionally exclude container queries from the CSS output from the editor, or whether this is better addressed via documentation.

It is 100% that. Regarding considering to putting work in it seems to me they are close to releasing that fix 🤞🏻 Depends when this gets released I guess https://github.com/WordPress/gutenberg/milestone/212

@gregsullivan
Copy link
Owner

Yeah, I think this is one that will be resolved soon enough that we can limit documentation to this issue. The release candidate for 16.5 is already out:

https://github.com/WordPress/gutenberg/releases/tag/v16.5.0-rc.1

@bruchh, I would suggest running the Gutenberg plugin until WordPress 6.4 is released, at which point you should be able to stop doing so. It looks like the fix will be in next week's release.

@scheinercc
Copy link

scheinercc commented Oct 8, 2023

Seems like the fix is coming to Core WP with version 6.4 on 7.11.

@scheinercc
Copy link

scheinercc commented Nov 15, 2023

FYI, upgraded to WP 6.4.1, switched "development:tailwind:editor" and "production:tailwind:editor" back on and all works perfectly fine now :)

@gregsullivan
Copy link
Owner

Thanks for following up to confirm 6.4.1 resolved this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Upstream Issues with upstream dependencies
Projects
None yet
Development

No branches or pull requests

3 participants