From 37d896a6901867018b412fe39a0c92498ef7e996 Mon Sep 17 00:00:00 2001 From: Kelly Choyce-Dwan Date: Tue, 3 Sep 2024 18:49:16 +0000 Subject: [PATCH] Help/About: Fix text wrapping on non-English locales. In [57715], headings on the About pages were given `text-wrap: balance`. This rule causes unexpected breaks in non-latin langauges, e.g., Japanese, Korean. This fix sets the text-wrap to `pretty` for browsers that support it, and uses `balance` for English-only. Props akshat2802, wildworks, ryelle, sabernhardt, hellofromTonya. Fixes #60892. git-svn-id: https://develop.svn.wordpress.org/trunk@58976 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/about.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/css/about.css b/src/wp-admin/css/about.css index 1db712dc0cfc1..79f0254ad33b8 100644 --- a/src/wp-admin/css/about.css +++ b/src/wp-admin/css/about.css @@ -407,10 +407,14 @@ .about__container h2, .about__container h3, .about__container h4 { - text-wrap: balance; + text-wrap: pretty; color: inherit; } +.about__container :is(h1, h2, h3, h4):lang(en) { + text-wrap: balance; +} + .about__container p { text-wrap: pretty; }