Skip to content

Instantly share code, notes, and snippets.

@torounit
Created March 18, 2020 05:07
Show Gist options
  • Save torounit/339bdab33c9e2705db3131de84cbe272 to your computer and use it in GitHub Desktop.
Save torounit/339bdab33c9e2705db3131de84cbe272 to your computer and use it in GitHub Desktop.
<?php
add_action( 'admin_enqueue_scripts', function () {
if ( get_option( 'page_on_front' ) === filter_input( INPUT_GET, 'post' ) ) {
wp_add_inline_style(
'wp-edit-post',
'
.block-editor-writing-flow { --block-width: 1136px; }
.wp-block { max-width: var(--block-width); }
'
);
} else {
wp_add_inline_style(
'wp-edit-post',
'
.wp-block { max-width: 812px }
.post-type-post .editor-styles-wrapper { background-color: #fff }
'
);
}
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment