Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Widows on headings #479

Closed
MaggieCabrera opened this issue Sep 21, 2023 · 3 comments
Closed

Widows on headings #479

MaggieCabrera opened this issue Sep 21, 2023 · 3 comments
Labels
[Type] Bug Something isn't working

Comments

@MaggieCabrera
Copy link
Collaborator

Bea mentioned that we should avoid having widows on prominent headings on the site such as the home page:

Screenshot 2023-09-21 at 19 00 41

This will only happen in English so my suggestion here is to use <br> in these cases to break the line where we want to and add a comment to the translators so they can decide if they want to remove that line break or not for their languages.

@MaggieCabrera MaggieCabrera added the [Type] Bug Something isn't working label Sep 21, 2023
@luminuu
Copy link
Member

luminuu commented Sep 21, 2023

This can very much happen in German and I guess in many other languages too and I don't see a benefit of adding extra HTML for optical reasons. And regular users will certainly not care about this. Which doesn't mean that this is a valid concern, it's just not practical for a wide range of users.

@sabernhardt
Copy link
Contributor

WordPress user "superpoincare" suggested using text-wrap: balance in Core themes. Would it be worth the performance cost and other considerations to add it to this theme's headings for any browser that supports the property?

@MaggieCabrera
Copy link
Collaborator Author

MaggieCabrera commented Sep 22, 2023

This can very much happen in German and I guess in many other languages too and I don't see a benefit of adding extra HTML for optical reasons. And regular users will certainly not care about this. Which doesn't mean that this is a valid concern, it's just not practical for a wide range of users.

It's design reasons (one which is widely accepted to be good practice), rather than optical and it doesn't cost us anything to do to make the theme look better, in particular when translators have an easy mechanism to ignore the fix just by deleting the tag if we document it properly.

I like the idea of the CSS rule but I've heard that text-wrap: pretty; is better for this particular problem specifically. I would like to see this in core rather than the theme and I believe it's something that is being considered.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
[Type] Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants