When using Text component from UI package with semantic rendering tags, common.css of WordPress overrides styles set by variant prop.
Example:
<Text
// eslint-disable-next-line jsx-a11y/heading-has-content -- content provided via render prop
render={ <h2 /> }
variant="heading-lg"
>
Example
</Text>
Component styles for heading-lg (15px):
Ends up looking bigger in reality when in wp-admin:
The solution could be higher specificity styles, even by using a format like h2.component-class?
When using
Textcomponent from UI package with semantic rendering tags,common.cssof WordPress overrides styles set byvariantprop.Example:
Component styles for
heading-lg(15px):Ends up looking bigger in reality when in wp-admin:
The solution could be higher specificity styles, even by using a format like
h2.component-class?