Gutenburg: Remove border of selected block
I am writing a plugin that creates a custom block. When the block is selected/focused in the editor, a border is created abound it (blue in the current version of WP).
I would like to disable the border for the specific block type, either in JavaScript or CSS. The problem is that the block content in the editor is wider than the block border, so it looks awkward. What would be a good solution?
EDIT (further explanation):
The content of the block is generated by the following command in the edit
function passed to the call to wp.blocks.registerBlockType(...)
:
React.createElement('div',
{
className: 'IA_Presenter_Container',
'data-block-id': props.attributes.block_id,
'behaviour': 'adaptive'
},
);
Basically, an empty div
element is created. The div
element is then taken over by a complex JavaScript application which build a full GUI environment in SVG. The environment is used to build and set the preferences for a dynamic gallery which will be displayed in the active page. All this happens without leaving the editor page, and it is important to be so.
When the block is focused, it is expanded by applying the following CSS to the div (the class IA_Designer_Full_Width
is added in script):
.IA_Designer_Full_Width{
position: relative;
width: 96vw;
left: 50%;
right: 50%;
margin-left: -48vw !important;
margin-right: -48vw !important;
max-width: 100vw !important;
}
The result (in a prototype) can be seen below. You see the blue border overlaying the interface:
Topic block-editor Wordpress
Category Web