pkgdown icon indicating copy to clipboard operation
pkgdown copied to clipboard

Tweak word-wrap rule for preventing horizontal scrollbar?

Open maelle opened this issue 2 years ago • 1 comments

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 avatar Nov 08 '21 14:11 maelle

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. :sweat_smile:

maelle avatar Nov 08 '21 14:11 maelle

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 avatar Apr 19 '24 16:04 hadley

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

hadley avatar Apr 19 '24 16:04 hadley

This looks good!

maelle avatar Apr 23 '24 07:04 maelle