How to override the spacing size value with custom css #132
Unanswered
amacaulay-ch
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to modify the core/group block to allow for custom spacing. I need it to be responsive and for me I think the best way is to use a custom class.
According to this section, one should be able to use a custom css variable.
When I try to use the same variable in the example the result is not the same.
My theme.json:
My css:
What i get on the style of the group block:
And these vars are not defined.
Notice that the var is actually
--wp--preset--spacing--mdand not--wp--custom--spacing--mdIt might be worth noting that I am building using ACF blocks, so not JavaScript based, but everything seems to be compiling correctly. I have a sense I'm missing something very simple here, but not sure where to go from here.
Beta Was this translation helpful? Give feedback.
All reactions