最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

customization - Using Primary Color in Plugin Block

programmeradmin3浏览0评论

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)

  1. 暂无评论