Last active
September 14, 2020 10:13
-
-
Save blogjunkie/71387d00004e33709edf621ec0795747 to your computer and use it in GitHub Desktop.
Astra enhancements for block editor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // don't include this tag | |
add_filter( 'astra_block_editor_dynamic_css', 'child_block_editor_inline_styles' ); | |
function child_block_editor_inline_styles( $styles ) { | |
$styles .= ' | |
.editor-styles-wrapper .wp-block{ | |
max-width: ' . astra_get_option('blog-single-max-width') . 'px; | |
} | |
.editor-styles-wrapper .wp-block[data-align=wide] { | |
max-width: ' . astra_get_option('site-content-width') . 'px; | |
} | |
'; | |
return $styles; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment