4

I'm developing a Gutenberg block, and I want the block to fit in as nicely as possible with the users site. So I'm trying to include as little styling of my own as possible, eg. allowing buttons to take their default shape and color.

But I've hit a problem, I want to use the primary color as background for a custom element (it's a plain old div). I found the .has-accent-background-color class and it worked on my testing site with the Twenty Twenty theme, but not when I changed to the Twenty Nineteen theme.

Is there a way to access the primary color independent of current theme?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.