Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
Tooltip,
__experimentalHStack as HStack,
} from '@wordpress/components';
import { VisuallyHidden } from '@wordpress/ui';
import { VisuallyHidden, Text } from '@wordpress/ui';
import { useInstanceId } from '@wordpress/compose';
import { __ } from '@wordpress/i18n';
import { Icon, symbol } from '@wordpress/icons';
Expand Down Expand Up @@ -154,9 +154,12 @@ function BlockPattern( {
/>
</div>
) }
<div className="block-editor-block-patterns-list__item-title">
<Text
render={ <div /> }
className="block-editor-block-patterns-list__item-title"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an ad hoc override, or a redundant font size style, or is the Text variant wrong?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that @mirka . I checked both variants:

body-sm: 12px font-size, 16px line-height, removes CSS override entirely.

body-md: would require keeping the CSS override, with 20px line-height.

Since the original font styling was effectively 12px and the original height of the div was 18.2px, I am leaning towards body-sm for a clean look. Please share your thoughts if that works.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that makes sense.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, made the changes.

>
{ pattern.title }
</div>
</Text>
</HStack>
) }

Expand Down
Loading