WordPress / wporg-news-2021

The WordPress.org News Theme
https://wordpress.org/news/
31 stars 21 forks source link

Prevent orphans in content #406

Closed eidolonnight closed 9 months ago

eidolonnight commented 1 year ago

Orphans, lone words at the ends of blocks of text, are commonplace across the freshly redesigned parts of WordPress.org. In various News posts, orphans appear in both titles and body content for common breakpoints.

CleanShot 2023-07-27 at 09 39 36@2x

CleanShot 2023-07-27 at 09 41 23@2x

While orphans can sometimes be addressed with the manual addition of a non-breaking space, that is not possible in post titles, and trying to manually adjust body text is an exercise in futility due to the variety of screen/window sizes, contributors, etc. I'd like to propose that this be addressed within the theme.

@adamwoodnz implemented a fix for WP20.WordPress.net, which could be used here. There are also javascript options for this.

adamwoodnz commented 1 year ago

Transferred to the News theme repo, as I realised News does not use the parent theme. We can duplicate the solution there.

adamwoodnz commented 11 months ago

PR is in progress for the Parent theme, which we can replicate in News if effective.