admin管理员组文章数量:1421762
I am working with a pre-existing theme. On the site in question, the style sets rules for P tags. These rules are applied in preference to the class styles for P tags used in certain blocks. (With the result that covers, for example, look quite silly). How can I fix this?
I am working with a pre-existing theme. On the site in question, the style sets rules for P tags. These rules are applied in preference to the class styles for P tags used in certain blocks. (With the result that covers, for example, look quite silly). How can I fix this?
Share Improve this question asked Jul 6, 2019 at 19:13 Matthew Brown aka Lord MattMatthew Brown aka Lord Matt 1,0683 gold badges13 silver badges34 bronze badges 4 |1 Answer
Reset to default 1Many of the default blocks add a class wp-block-[name]
to the block's root element on save. You could use these to increase your class specificity.
For your example of covers, .wp-block-cover .has-huge-font-size
or .wp-block-cover p.has-huge-font-size
depending on how much specificity you need.
本文标签: How do I make sure the gutenberg block CSS is not disrupted by generic styles
版权声明:本文标题:How do I make sure the gutenberg block CSS is not disrupted by generic styles? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745334893a2653992.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
p
as something like12pt
which makes.has_huge_font_size
overridden. – Matthew Brown aka Lord Matt Commented Jul 7, 2019 at 6:59