Skip to content

Conversation

@NadavTasher
Copy link

Purpose

Anchors with very long unbreakable links cause pages to be horizontally scrollable on mobile.
Fix this by allowing anchors to break anywhere.

This was observed on the following page:
https://docs.kernel.org/filesystems/ramfs-rootfs-initramfs.html#why-cpio-rather-than-tar

Screenshots

Without the proposed changes:
image

With the proposed changes:
image

Anchors with very long unbreakable links cause pages to be
horizontally scrollable on mobile.

Fix this by allowing anchors to break anywhere.
@mgeier
Copy link
Contributor

mgeier commented Oct 26, 2025

I've used this before:

    overflow-wrap: break-word;

Can anyone tell which one is better in this case?

@NadavTasher
Copy link
Author

From https://stackoverflow.com/questions/17259916/difference-between-overflow-wrap-and-word-break, it seems as though word-break is actually deprecated. I'll update my PR to use overflow-wrap.

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