WordPress/wordpress.org

Avoid typographic widows

Closed this issue · 3 comments

Reported by: @jasmussen


There’s a typographic widow here:

Image

That one is particularly tricky because it's appears responsively. For that reason, the easiest fix is to apply text-wrap: pretty; across the entire section. In fact it might be useful to have this applied simply to the paragraph element.

I see this was given priority as "high". The widow currently exists in the current theme.

I would prefer we invest effort in #224 (comment) instead of adding this temporary fix to the new theme.

It should be applied to paragraphs via the parent theme, unless is it's been overridden

https://github.com/WordPress/wporg-parent-2021/blob/trunk/source/wp-content/themes/wporg-parent-2021/sass/base/_elements.scss#L16

It appears because the text is not a paragraph, it's a div:

Screenshot 2024-04-29 at 08 31 16

It's high priority to fix the typographic widow, and the text-wrap property should theoretically have been a generic fix, except for the paragraph thing. I would agree it can be fixed either by moving to the new default CTA style. Another option, potentially, is to edit the content of the widgets to add the <p> tags manually.