Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/components/visual-editor/default-theme-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
* unavailable or when the editor's theme styles feature is disabled.
*/

.gutenberg-kit-visual-editor__post-title-wrapper .wp-block-post-title {
font-size: 20px; // Set reasonable default size for small screens
}

.block-editor-default-block-appender__content {
opacity: 0.62; // Match empty post title/rich text placholder style
}
Expand Down
32 changes: 32 additions & 0 deletions src/utils/default-editor-styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* Default editor styles.
*
* These styles are shown if a theme does not register its own editor style,
* a theme.json file, or has toggled off "Use theme styles" in preferences.
*
* Vendored from the `@wordpress/block-editor` package, which removed the
* stylesheet because the Gutenberg plugin no longer enqueues it and WordPress
* core owns the equivalent styles.
*
* @see https://github.com/WordPress/gutenberg/blob/28c348acdf3e88bbd90f766e66acc6716bcf9103/packages/block-editor/src/default-editor-styles.scss
* @see https://github.com/WordPress/gutenberg/pull/81793
* @see https://github.com/WordPress/wordpress-develop/blob/db9654e6d386c2c69401b9c77c6ce1ae7460a6e4/src/wp-includes/block-editor.php#L218C4-L218C23
*/

@use "@wordpress/base-styles/variables" as *;

body {
font-family: $default-font;
font-size: 18px;
line-height: 1.5;
--wp--style--block-gap: 2em;
}

p {
line-height: 1.8;
}

.editor-post-title {
font-size: 20px; // Set reasonable default size for small screens
font-weight: 800;
}
6 changes: 5 additions & 1 deletion src/utils/editor-settings.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
/**
* WordPress dependencies
*/
import defaultEditorStyles from '@wordpress/block-editor/build-style/default-editor-styles.css?inline';
import { store as editorStore } from '@wordpress/editor';
import { select } from '@wordpress/data';

/**
* Internal dependencies
*/
import defaultEditorStyles from './default-editor-styles.scss?inline';

/**
* Returns a default editor settings object to use when a site cannot provide
* its own editor settings due to lacking the necessary experimental REST API
Expand Down
Loading