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

feat!: Update hyphenation tokens #1914

Merged
merged 7 commits into from
Mar 12, 2025

Conversation

VincentSmedinga
Copy link
Contributor

@VincentSmedinga VincentSmedinga commented Mar 7, 2025

Describe the pull request

Thank you for contributing to the project!
Please use this template to help us handle your PR smoothly.

What

  1. Moves the hyphenate-limit-chars token into the typography group.
  2. Removes the tokens for hyphens and overflow-wrap
  3. Updates docs

Why

  1. Because it fits there.
  2. Because these values aren’t intended to be customized.

How

n/a

Checklist

Before submitting your pull request, please ensure you have done the following. Check each checkmark if you have done so or if it wasn't necessary:

  • Add or update unit tests
  • Add or update documentation
  • Add or update stories
  • Add or update exports in index.* files
  • Start the PR title with a Conventional Commit prefix, as explained here.

Additional notes

  • n/a

@VincentSmedinga VincentSmedinga requested a review from dlnr March 7, 2025 20:41
@VincentSmedinga VincentSmedinga requested a review from a team as a code owner March 7, 2025 20:42
@github-actions github-actions bot temporarily deployed to demo-DES-1081-hyphenation-tokens March 7, 2025 20:51 Destroyed
@VincentSmedinga VincentSmedinga force-pushed the feat/DES-1081-hyphenation-tokens branch from c7d73af to 435c054 Compare March 7, 2025 20:53
@github-actions github-actions bot temporarily deployed to demo-DES-1081-hyphenation-tokens March 7, 2025 20:54 Destroyed
@VincentSmedinga VincentSmedinga changed the title feat!: Change hyphenation tokens feat!: Update hyphenation tokens Mar 7, 2025
@github-actions github-actions bot temporarily deployed to demo-DES-1081-hyphenation-tokens March 10, 2025 08:26 Destroyed
dlnr
dlnr previously approved these changes Mar 10, 2025
Copy link
Contributor

@dlnr dlnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Also, text-wrap: pretty is something to consider, it will prevent multiple lines that end in hyphens (which is ugly): https://developer.chrome.com/blog/css-text-wrap-pretty

@VincentSmedinga
Copy link
Contributor Author

Also, text-wrap: pretty is something to consider, it will prevent multiple lines that end in hyphens (which is ugly)

We have already reduced the chance of successive hyphens by only breaking words of at least 12 characters long. Pretty text wrapping still has a performance penalty, so I think hyphenate-limit-chars (which is just landing in Firefox, while Chrome and Edge already support it) should suffice:

Note that pretty has a negative effect on performance, so it should be only used for longer blocks of text when the layout is more important than speed. – MDN

Co-authored-by: Aram <37216945+alimpens@users.noreply.github.com>
@github-actions github-actions bot temporarily deployed to demo-DES-1081-hyphenation-tokens March 11, 2025 16:42 Destroyed
@VincentSmedinga VincentSmedinga enabled auto-merge (squash) March 11, 2025 16:42
@github-actions github-actions bot temporarily deployed to demo-DES-1081-hyphenation-tokens March 11, 2025 16:45 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-1081-hyphenation-tokens March 11, 2025 21:41 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-1081-hyphenation-tokens March 11, 2025 21:44 Destroyed
@VincentSmedinga VincentSmedinga merged commit 0c7f359 into develop Mar 12, 2025
6 checks passed
@VincentSmedinga VincentSmedinga deleted the feat/DES-1081-hyphenation-tokens branch March 12, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants