-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Block styles set via the "css" property in theme.json are ignored on the frontend in classic/hybrid themes #52644
Comments
It looks like the following code is the culprit: If I remove the I think the check must be replaced with:
I hope this can be fixed in WP 6.3. |
Until this get fixed in core, you can add the following code to your
|
Done some benchmarking on this change. |
Hi folks, |
It seems to me this has been fixed in trunk. I think #62357 / WordPress/wordpress-develop#6750 solved the issue, by also deprecating Can anyone confirm? |
Apparently, this is no longer an issue in 6.6. I'm currently testing this with 6.6 RC4 and custom CSS in |
Test resultsTheme.json:
6.6, with and and without Gutenberg trunk✅ Block Editor: Links are red with a green border. Paragraphs have blue background. Outlined buttons have red border. |
Thanks for the test, @carolinan! So, right now (WP 6.6), custom CSS on the frontend/customizer of sites using classic/hybrid themes is still not working when it's outside the |
Description
Block styles set via the "css" property in theme.json are ignored on the frontend in classic themes. An example:
The background color set via "color" can be seen in both the block editor and the frontend. The link color set via "css" can only be seen in the block editor.
Block themes (I tested Twenty Twenty-Three) are not affected by this issue, just classic/hybrid ones.
Step-by-step reproduction instructions
styles
section:Screenshots, screen recording, code snippet
Block editor:
Frontend:
Environment info
I'm using WP 6.3 beta 4.
NO Gutenberg plugin installed.
PHP 8.0.22
MySQL 8.0.16
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: