Home › Forums › Gutenberg › Block 'Supports' not working as expected › Reply To: Block 'Supports' not working as expected
Hi Igladdy, thanks the reply!
I have tried it on both ACF 5.9 and ACF 5.10.
In ACF 5.9 it works fine. I noticed that in ACF 5.9, when I do a var_dump of the block, the array for padding is a bit different:
[style] => Array
(
[spacing] => Array
(
[padding] => Array
(
[top] => 200px
[right] => 200px
[bottom] => 200px
[left] => 200px
)
)
[typography] => Array
(
[lineHeight] => 2.1
)
)
Whereas with ACF 5.10 it’s like this:
[style] => Array
(
[paddingTop] => 200px
[paddingRight] => 200px
[paddingBottom] => 200px
[paddingLeft] => 200px
[typography] => Array
(
[lineHeight] => 2.1
)
)
I changed the way the PHP template finds the padding to compensate for this, eg:
if(isset($block['style']['paddingTop'])) {$inlineStyles .= 'padding-top:' . $block['style']['paddingTop'] . ';' ;}
But it won’t save as described above.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.