I have added custom spacing to my theme.json. My values are showing and working in core and acf blocks that I have turned on spacing support for.
I can also see a value for $block['style']['spacing']['padding']['top']
but it is a useless string: "var:preset|spacing|MM"
When I use get_block_wrapper_attributes()
I get the proper classes class="aligncenter wp-block-acf-block-template"
but I never get style=""
values like my core blocks:
style="padding-top:var(--wp--preset--spacing--m);padding-right:var(--wp--preset--spacing--m);padding-bottom:var(--wp--preset--spacing--m);padding-left:var(--wp--preset--spacing--m)"
How can I get the style values properly rendered in my block?
Hi @jesscloudcreations-ca
You can read this post.
Cheers