Skip to content

fix(routes/examples): remove fixed 'h-[95dvh]' breaking Safari render#973

Merged
tannerlinsley merged 1 commit into
mainfrom
fix/iframe-sandbox-safari
Jun 9, 2026
Merged

fix(routes/examples): remove fixed 'h-[95dvh]' breaking Safari render#973
tannerlinsley merged 1 commit into
mainfrom
fix/iframe-sandbox-safari

Conversation

@sukvvon

@sukvvon sukvvon commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

Removes the fixed h-[95dvh] height from the examples page scroll container, which prevented the embedded code example viewer from rendering in Safari.

Problem

On example pages, the interactive code explorer rendered correctly in Chrome but collapsed in Safari. The scroll container used a fixed h-[95dvh] inside a md:flex-row flex layout. WebKit miscalculated this fixed dvh height, collapsing the container to ~79px while its content was ~1005px tall. The overflow-auto then clipped everything below the collapsed height.

Fix

-    <div className="flex-1 flex flex-col min-h-0 overflow-auto h-[95dvh]">
+    <div className="flex-1 flex flex-col min-h-0 overflow-auto">

The container already receives its height from the parent flex layout via flex-1 min-h-0, so h-[95dvh] was redundant in Chrome (height unchanged) and harmful in Safari. Verified the fix renders correctly in both Safari and Chrome.

Screenshot

AS-IS

Safari

image

Chrome

image

TO-BE

Safari

image

Chrome

image

Summary by CodeRabbit

  • Style
    • Adjusted the layout of the examples section to provide better vertical flexibility by removing a fixed height constraint while maintaining responsive scrolling behavior.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

A single CSS class is removed from the examples route's main container element. The h-[95dvh] height constraint is dropped while preserving the flex layout, minimum height, and overflow handling that enable proper content scrolling.

Changes

Examples Container Styling

Layer / File(s) Summary
Remove height constraint from examples container
src/routes/$libraryId/$version.docs.framework.$framework.examples.$.tsx
The main flex wrapper loses the h-[95dvh] fixed height class while retaining flex-1 flex flex-col min-h-0 overflow-auto for flexible layout and scrolling.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops through styled flex flows,
Removing heights that constrain the box,
95 viewport units take their bows,
While overflow-auto keeps the layout unlocked.
Simpler constraints, more room to grow! 🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: removing a fixed height class that was breaking Safari rendering in the examples route.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/iframe-sandbox-safari

Comment @coderabbitai help to get the list of available commands and usage tips.

@tannerlinsley tannerlinsley merged commit 9bc6f65 into main Jun 9, 2026
9 checks passed
@tannerlinsley tannerlinsley deleted the fix/iframe-sandbox-safari branch June 9, 2026 15:40
@bytaesu

bytaesu commented Jun 9, 2026

Copy link
Copy Markdown

👍

@sukvvon sukvvon self-assigned this Jun 10, 2026
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