[wp-trac] [WordPress Trac] #63276: Content width in block editor styles expects padding
WordPress Trac
noreply at wordpress.org
Tue May 13 08:26:40 UTC 2025
#63276: Content width in block editor styles expects padding
----------------------------+----------------------
Reporter: SergeyKovalets | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.9
Component: Bundled Theme | Version: 5.0
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: ui, css
----------------------------+----------------------
Comment (by soyebsalar01):
If the content width in the block editor looks different from the live
site, it’s usually because the theme doesn’t apply the same styles in the
editor as it does on the frontend.
To fix this, you can add some custom styles to the block editor so it
better matches your site layout. Here’s how:
Open your theme’s functions.php file.
Add this line if it’s not there already:
add_theme_support( 'editor-styles' );
add_editor_style( 'editor-style.css' );
Then, create a file called editor-style.css in your theme folder.
Inside that file, you can add CSS to control the content width in the
editor — something like:
.wp-block {
max-width: 800px; /* or whatever matches your site's content width */
}
This will make the block editor look more like your actual post once it's
published.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63276#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list