Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add default editor styles applied to themes without theme.json and without editor styles #34439
Add default editor styles applied to themes without theme.json and without editor styles #34439
Changes from 3 commits
9c0a85b
eea9799
9d32ac2
a9da477
ae1b05d
7ead394
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasmussen this is the styles file if you want to tweak it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got a related PR at #34334 that enqueues the global styles for all themes. After it lands, shouldn't these styles live at
lib/theme.json
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know, what I know is that they need to be in a dedicated setting in order for this logic to apply https://github.com/WordPress/gutenberg/pull/34439/files#diff-d00cfe048041886ee9b16f6f42422317b6e770cbea20cbe0e4d0ca7c8e0ec0e1R159-R161
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey, so since #35424 all themes provide some
styles
to settings: at least they'll have the core preset styles. That inadvertently cause a bug for themes that don't provide any editor styles: they no longer had any defaults. See issue at #35730I've created a fix for this at #35736 but I'm not convinced is the right approach. So I've prepared a second fix to absorb the defaults as part of the styles we send to the client in
global-styles.php
, see #35737I'd love hearing your thoughts on which approach makes more sense to you.