refactor: vendor the default editor styles stylesheet - #600
Open
dcalhoun wants to merge 2 commits into
Open
Conversation
Gutenberg #81793 removed `default-editor-styles.scss` from the `@wordpress/block-editor` package. The stylesheet still ships in the pinned version, so nothing breaks today, but the next package bump including the removal would break the build. Copy the stylesheet into the repo and import it locally, matching the approach already used for `default-theme-styles.scss` and `wp-common-styles.scss`. The compiled output is unchanged from the package's `build-style` version. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YZ5JzgG1CKQwmSN2P3B4R6
XCFramework BuildThis PR's XCFramework is available for testing. Add the following to your .package(url: "https://github.com/wordpress-mobile/GutenbergKit", branch: "pr-build/600")Built from de038d8 |
The previous post title selector was incorrect, and the unused styles were not as fitting for smaller screens.
dcalhoun
marked this pull request as ready for review
August 22, 2026 19:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What?
Copies
default-editor-styles.scssout of@wordpress/block-editorand intosrc/utils/, and imports it locally ineditor-settings.js.Fixes #590. Fixes CMM-2330.
Why?
Gutenberg #81793 removed the stylesheet from the package. It still ships in our pinned
@wordpress/block-editor@15.14.0, so nothing is broken today — but the next bump that includes the removal breaks the build, and our usage shouldn't hold up the upstream cleanup.The styles matter for us:
getDefaultEditorSettings()suppliesdefaultEditorStyleswhen a site can't provide its own editor settings, a supported path in the mobile apps.How?
The vendored copy is byte-identical to the upstream file at
28c348a(the commit before removal), with a header comment pointing back at the source, the removal PR, and core's equivalent inwp-includes/block-editor.php. Same approach asdefault-theme-styles.scssandwp-common-styles.scss.Testing Instructions
Regression check; no user-facing change expected.
trunk.🤖 Generated with Claude Code
https://claude.ai/code/session_01YZ5JzgG1CKQwmSN2P3B4R6