In Gutenberg, the markup from the edit
function is wrapped in a few other elements. The outer wrapper of each block has the wp-block
class and a data-block
attribute that contains the name of the block with its namespace – core/group
for the group block, for example.
We can change the attributes of that wrapper, so we could add class names depending on the selected/changed block options, what could make the styling of blocks in the backend easier.
Continue reading "Change block edit wrapper attributes"