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

Only break within words in codes #1489

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

Conversation

Peeja
Copy link

@Peeja Peeja commented Feb 24, 2025

In #802, these lis were set to word-break: break-all, causing any word that's unfortunate enough to find itself at the end of a line to break at any arbitrary character. This was done to keep long words in code elements, like "git+https://example.com/foo/bar#115311855adb0789a0466714ed48a1499ffea97e", from overflowing the line box and the right margin. But we only want that behavior for codes, not for all text in the li.

Screenshots

Before

https://docs.npmjs.com/package-name-guidelines

CleanShot 2025-02-24 at 14 59 13

https://docs.npmjs.com/cli/v11/configuring-npm/package-lock-json

CleanShot 2025-02-24 at 15 03 46

After

https://docs.npmjs.com/package-name-guidelines

CleanShot 2025-02-24 at 15 03 00

https://docs.npmjs.com/cli/v11/configuring-npm/package-lock-json

CleanShot 2025-02-24 at 15 06 44

References

Related to #802

Normal words shouldn't break at random places.
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.

1 participant