Skip to content

refactor: vendor the default editor styles stylesheet - #600

Open
dcalhoun wants to merge 2 commits into
trunkfrom
task/vendor-default-editor-styles
Open

refactor: vendor the default editor styles stylesheet#600
dcalhoun wants to merge 2 commits into
trunkfrom
task/vendor-default-editor-styles

Conversation

@dcalhoun

@dcalhoun dcalhoun commented Aug 22, 2026

Copy link
Copy Markdown
Member

What?

Copies default-editor-styles.scss out of @wordpress/block-editor and into src/utils/, and imports it locally in editor-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() supplies defaultEditorStyles when 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 in wp-includes/block-editor.php. Same approach as default-theme-styles.scss and wp-common-styles.scss.

Testing Instructions

Regression check; no user-facing change expected.

  1. Load the editor against a site without the Gutenberg plugin (no editor-settings endpoint supplying styles).
  2. Confirm body text renders at 18px, paragraphs at 1.8 line height, and the post title larger and bold — unchanged from trunk.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YZ5JzgG1CKQwmSN2P3B4R6

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
@dcalhoun dcalhoun added [Type] Task Issues or PRs that have been broken down into an individual action to take Gutenberg labels Aug 22, 2026
@wpmobilebot

wpmobilebot commented Aug 22, 2026

Copy link
Copy Markdown

XCFramework Build

This PR's XCFramework is available for testing. Add the following to your Package.swift:

.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
dcalhoun marked this pull request as ready for review August 22, 2026 19:44
@dcalhoun
dcalhoun requested a review from nbradbury August 22, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gutenberg [Type] Task Issues or PRs that have been broken down into an individual action to take

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Embed a local copy of the default editor styles stylesheet

2 participants