-
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
#34334 Breaks styles in theme's styles.css #34575
Comments
I have queried the use of the It is quite often completely unnecessary, and with every new release of Gutenberg there seems to be more and more instances of Sorry I don't know what the answer is long term, as I don't think Gutenberg is going to stop using it any time soon. |
I have exactly the same problem and it obviously breaks all my websites. The use of !important with the font-sizes, destroys my carefully crafted responsive typo styles. I happily would like to use a theme.json file for other stuff, so maybe it would be possible to either remove the "!important" or add a filter in "class-wp-theme-json-gutenberg.php" that you can remove it with. |
Another option obviously would be adding the possibility to use responsive sizes like so:
Created CSS vars: Ideally the mobile, tablet, desktop, wide, extra-wide variables are also defined somewhere in the theme.json. I would still have the !important rule removed however. |
That would be an alternative way. |
This probably needs to be a separate issue, but I would much rather see use of responsive typography values in theme.json instead of getting into adding breakpoints. The example in the OP could be expressed in a single value as However, the |
Theme.json basically breaks responsive typography. This is essential?! |
YES! THIS IS ESSENTIAL! |
Bumping this issue up – this behavior breaks themes I’ve written when testing with 5.9 RC1. We use responsive rem-based typography, and always treated the pixel value registered via (Aside: It is extremely frustrating how cavalierly the Gutenberg team is treating compatibility with existing sites.) |
@mkkeck, it seems like WordPress/wordpress-develop#2129 should have fixed part of this problem in 5.9.1, just leaving the question about some of the uses of |
Description
#34334 Breaks some styles in themes-name/styles.css.
For example responsive font sizes defined in theme's styles.css won't work.
Step-by-step reproduction instructions
For example I 've follow rules in my CSS file which enables responsive font sizes:
But with the #34334 there's an inline style added, which merges WordPress default global styles with the settings from theme.json which set's:
The
!important
flag is here the problem.I think this could break much other themes, so please add a filter or hook, to modify or disable the
global-styles
.Screenshots, screen recording, code snippet
No response
Environment info
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: