I am using Gutenberg to create tables. Gutenberg tables have the following front-end structure :
<figure class="wp-block-table">
<table>
...
</table>
</figure>
I’d like to add a drop-shadow to my table but it doesn’t work due to overflow-x : auto
on the parent element figure
.
One fix would be to wrap the table like this :
<figure class="wp-block-table">
<div class="table-wrapper">
<table>
...
</table>
</div>
</figure>
Is there a way to easily wrap the table
? I’ve seen a way to wrap a whole gutenberg block (using render_block
filter) but no only a child element.