Skip to content

Conversation

@t-hamano
Copy link
Contributor

@t-hamano t-hamano commented Nov 26, 2025

Found while investigating the approach suggested in #73454 (comment)

What?

There is a style called classic-theme-styles that is only enqueued when the classic theme is active. I found that the Gutenberg plugin was missing the code to override this. This PR overrides this core style so that the Gutenberg plugin can test styles for the new classic theme.

Testing Instructions

  • Activate any of the classic themes
  • Open packages/block-library/src/classic.scss and add some changes
  • Confirm that the style is applied correctly on both the editor and the front-end

Screenshots or screencast

classic-style

@t-hamano t-hamano self-assigned this Nov 26, 2025
@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts labels Nov 26, 2025
@t-hamano t-hamano force-pushed the override-classic-theme-styles branch from 6115296 to 548c4f6 Compare November 26, 2025 11:19
@t-hamano t-hamano force-pushed the override-classic-theme-styles branch from 548c4f6 to dde0c1d Compare November 26, 2025 11:20
@t-hamano t-hamano added the No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core label Nov 26, 2025
@t-hamano t-hamano marked this pull request as ready for review November 26, 2025 11:23
@github-actions
Copy link

github-actions bot commented Nov 26, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: aaronrobertshaw <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link

Flaky tests detected in dde0c1d.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19701969594
📝 Reported issues:

Copy link
Contributor

@aaronrobertshaw aaronrobertshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @t-hamano 👍

LGTM

✅ Classic style overrides appear in the editor
✅ Same overrides appear on the frontend

Tested with TwentyTwenty theme and this small tweak:

.wp-block-post-content,
.entry-content {
	background: darkseagreen;
}

Editor:
Screenshot 2025-11-27 at 11 40 24 am

Frontend:

Screenshot 2025-11-27 at 11 40 41 am

@t-hamano
Copy link
Contributor Author

t-hamano commented Nov 27, 2025

@aaronrobertshaw Thanks for the review!

P.S. We are aiming to adjust the CSS for the Accordion Heading block in the point release 6.9.1. This PR is not directly related to the 6.9 release, but I'd like to add the Backport to WP Minor Release label because without it, the CSS preview in the Gutenberg plugin would not be possible.

@t-hamano t-hamano added the Backport to WP Minor Release Pull request that needs to be backported to a WordPress minor release label Nov 27, 2025
@t-hamano t-hamano merged commit 48e78a7 into trunk Nov 27, 2025
47 of 48 checks passed
@t-hamano t-hamano deleted the override-classic-theme-styles branch November 27, 2025 02:13
@github-actions github-actions bot added this to the Gutenberg 22.3 milestone Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport to WP Minor Release Pull request that needs to be backported to a WordPress minor release Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants