Skip to content

Conversation

SkydiverTyler
Copy link

@SkydiverTyler SkydiverTyler commented Oct 23, 2024

Issue

Inside the "Svelte 5 Migration Guide" page, under the "Modern Browser Required" section, there is a list of inline <code> elements (starting with clientWidth...) that horizontally overflow on Mobile Safari (iOS 18.0.1), causing a horizontal scrollbar to appear.

Change summary

Inside the <Text> component, adding the line-break: normal; property to the relevant CSS selector allows the inline <code> elements to wrap with the text as expected, eliminating the horizontal scroll bar on the page mentioned above.

https://developer.mozilla.org/en-US/docs/Web/CSS/line-break

Screenshots

BEFORE:

IMG_3774

AFTER:

IMG_3779

…roll bar

The "Svelte 5 Migration Guide" page, under the "Modern Browser Required" section, there is a list of inline <code> elements (`clientWidth`...) that horizontally overflow on Mobile Safari, causing a horizontal scrollbar to appear.

Adding the `line-break` property to the relevant CSS selector is a simple change that fixes the issue and doesn't appear to break any other styling. (Full transparency, I don't have the time to go through every single page to verify this claim 100%)
Copy link

vercel bot commented Oct 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
learn-svelte-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 1:12am
omnisite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 1:12am

@Rich-Harris
Copy link
Member

Thank you! Unfortunately this seems to have no effect on Chrome. I've opened #577 as a potential alternative to a CSS fix, though it might be too much of an aesthetic downgrade

@dummdidumm
Copy link
Member

Closing in favor of #577

@dummdidumm dummdidumm closed this Oct 23, 2024
@SkydiverTyler SkydiverTyler deleted the patch-1 branch October 23, 2024 23:22
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.

3 participants