Force block preview to be full width
-
I’m developing a site with the admin theme and front end theme using the same stylesheet. This is great so far, because the block editor is very WYSIWYG. However, I registered a bunch of blocks with acf_register_block_type and disabled ‘align’ support. I did this because I don’t want the content manager to be able to control the width or alignment of these blocks.
The problem is that I can’t seem to get the block to default to full-width in the block editor. It looks fine on the front end, but on the back my blocks are constrained to 820px. I don’t even mind if they’re this width is edit mode, and in fact it actually makes the blocks easier to edit this way. However, when the user switches to preview mode, the block should be full width because this is a faithful representation of the front end.
So my question is how to remove max-width when an ACF block is in preview mode. If necessary, I’m OK forcing these blocks to be full width in both edit and preview modes.
The topic ‘Force block preview to be full width’ is closed to new replies.