Skip to content

fix: allow inline code to wrap on mobile viewports#13252

Open
blaqshyd wants to merge 2 commits intoflutter:mainfrom
blaqshyd:fix/mobile-code-overflow
Open

fix: allow inline code to wrap on mobile viewports#13252
blaqshyd wants to merge 2 commits intoflutter:mainfrom
blaqshyd:fix/mobile-code-overflow

Conversation

@blaqshyd
Copy link
Copy Markdown

@blaqshyd blaqshyd commented Apr 6, 2026

Description of what this PR is changing or adding, and why:

This PR resolves the horizontal overflow issue reported in #13251.

By removing the rigid white-space: nowrap rule for main code and main kbd elements, the site now utilizes a fluid wrapping model. This ensures that long API identifiers (common in breaking changes documentation) wrap gracefully on mobile devices
or on desktop viewports with an active sidebar.

Issues fixed by this PR (if any): Fixes #13251

PRs or commits this PR depends on (if any):

VIsual Verification

Before After
Before - Mobile After - Mobile

Presubmit checklist

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@blaqshyd blaqshyd requested review from a team and sfshaza2 as code owners April 6, 2026 13:05
@google-cla
Copy link
Copy Markdown

google-cla bot commented Apr 6, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the SCSS for code components, primarily changing the white-space and word-break properties for inline code to allow for better text wrapping. It also includes various formatting adjustments, such as removing spaces around child combinators and cleaning up trailing whitespace. The review feedback identifies unnecessary empty lines that should be removed to maintain consistency with the existing file style.

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.

Horizontal overflow on mobile viewports for inline code snippets

1 participant