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

Tweak word-wrap rule to prevent long words becoming scrollburglars #1888

Merged
merged 4 commits into from
Apr 23, 2024

Conversation

maelle
Copy link
Collaborator

@maelle maelle commented Nov 8, 2021

On small devices e.g. IPhone, the article I edited gets a horizontal scrollbar which hides the toggle button (well one can scroll to find it).

@maelle
Copy link
Collaborator Author

maelle commented Nov 8, 2021

Something like

body {
    word-wrap: break-word;
}

would work.

Maybe such a long word will never happen though. It's a courtesy from cat ipsum. 😅

@maelle maelle marked this pull request as ready for review November 12, 2021 08:24
@hadley
Copy link
Member

hadley commented Apr 19, 2024

Probably something like:

main {
    overflow-wrap: break-word;
    hyphens: auto;
  }

overflow-wrap is the official name, and hyphens will automatically add a - in most browsers. Probably want to scope this to the main content only, because I'm not sure what the consequences of changing this on bootstrap nav stuff might be

@hadley
Copy link
Member

hadley commented Apr 19, 2024

I can't request that you review your own PR, but please take a look at my proposal.

@hadley hadley changed the title Tweak word-wrap rule for preventing horizontal scrollbar? Tweak word-wrap rule to prevent long words becoming scrollburglars Apr 19, 2024
@maelle
Copy link
Collaborator Author

maelle commented Apr 23, 2024

This looks good!

@hadley hadley merged commit 3d06c13 into main Apr 23, 2024
12 checks passed
@hadley hadley deleted the word-break branch April 23, 2024 19:03
SebKrantz pushed a commit to SebKrantz/pkgdown that referenced this pull request Jun 1, 2024
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.

2 participants