Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add text-wrap: balance to all headings #949

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

janbrasna
Copy link
Contributor

Description

css-ui_css-text-wrap-balance

https://caniuse.com/css-text-wrap-balance is pretty well supported now with no real downside, known bugs or performance issues documented.

  • I have documented this change in the design system.
  • I have recorded this change in CHANGELOG.md.

Issue

Resolves #910

Testing

Safari 16 vs. 17.5+
Firefox ESR (115) vs. 122+

TODO: interaction with white-space

@stephaniehobson
Copy link
Contributor

@janbrasna Do you remember what the problem is with white-space?

@janbrasna
Copy link
Contributor Author

@stephaniehobson So the issue is what risk this might pose for downstream consumers, where balancing text IIUC actually competes with white-space property per se (as one is asking for no wrapping and the other is asking for balanced wrapping) — guess I wanted to check a few layouts over at kitsune, fxa, relay et al. how such a change wholesale could interfere with what they have added to the cascade in addition to protocol styling.

(For just bedrock this should be a non-issue, as balancing headings has been around for some time now.)

@stephaniehobson
Copy link
Contributor

Seems like it follows the cascade in Firefox and Chrome so any custom styles they have applied should take president if they're importing their styles after the Protocol one.

I think we're safe to go ahead but I'd add something to the CHANGELOG's migration notes to search for any place where white-space: nowrap is defined and make sure it has a higher specificity.

@stephaniehobson
Copy link
Contributor

It might be a nice change to include with V20 which will have other font updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add text-wrap: balance to headings
2 participants