You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Embed a local copy of the default editor styles stylesheet #590
Gutenberg #81793 removed packages/block-editor/src/default-editor-styles.scss upstream, since the plugin hasn't enqueued it since #41306 and core owns it now. Our usage was flagged in this review comment, which also noted the removal is a breaking change for the package.
The stylesheet still ships in our pinned @wordpress/block-editor@16.0.0, so nothing is broken today. But the next package bump that includes the removal will break the build, and GutenbergKit shouldn't hold up an upstream cleanup either way.
These styles matter for us specifically: getDefaultEditorSettings() supplies defaultEditorStyles when a site can't provide its own editor settings (no experimental REST API endpoint), which is a supported path in the mobile apps.
What is your proposed solution?
Vendor the stylesheet into GutenbergKit and import it locally instead of from the package.
The repo already does this for two similar cases — src/components/visual-editor/default-theme-styles.scss and wp-common-styles.scss — both imported with ?inline in visual-editor/index.jsx. Same approach here:
Add the removed SCSS as a local file (~25 lines: $default-font body type, paragraph line height, post title sizing), with a header comment pointing back at the upstream source.
Update the import in src/utils/editor-settings.js to the local .scss?inline path.
@wordpress/base-styles is already a dependency, so the @use of variables resolves as-is.
Worth deciding as part of this: whether to keep tracking core's version of these styles (wp-includes/block-editor.php) or treat the vendored copy as GutenbergKit's own defaults, which we'd then be free to tune for mobile.
Activity