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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745334894a4623057.html
p
as something like12pt
which makes.has_huge_font_size
overridden. – Matthew Brown aka Lord Matt Commented Jul 7, 2019 at 6:59