Skip to content

Fix expanding side images on mobile - #271

Draft
jpers1 wants to merge 1 commit into
biolab:masterfrom
jpers1:fix/mobile-side-image-layout
Draft

Fix expanding side images on mobile#271
jpers1 wants to merge 1 commit into
biolab:masterfrom
jpers1:fix/mobile-side-image-layout

Conversation

@jpers1

@jpers1 jpers1 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • reset expandable side images to normal document flow at the existing 680px mobile breakpoint
  • constrain the wrapper and image to the available content width while preserving image aspect ratio
  • retain captions and child content below the image without overlap
  • add a repository-owned synthetic fixture and focused desktop Chromium/mobile WebKit regression coverage

Root cause

The desktop ExpandingSideImg rules position and transform the image wrapper for its side expansion behavior. The previous mobile rule adjusted the image width but did not override that positioning and transform with sufficient specificity, so narrow-screen side images could remain displaced or effectively absent. The mobile rule now targets div.expanding-side-img, restores normal flow with position: static, removes the transform, and constrains both wrapper and image dimensions.

Scope

This PR addresses only ExpandingSideImg behavior on narrow screens. It is independent of the mobile header fix in #270 and does not address the separate document-level horizontal-overflow investigation. Mobile WebKit coverage uses Playwright iPhone 13 emulation, not a physical Safari device.

Validation

  • yarn install --frozen-lockfile
  • yarn test:e2e (4 passed: baseline and side-image tests in desktop Chromium and mobile WebKit)
  • yarn test:e2e:mobile (2 passed)
  • yarn build
  • yarn check-translations
  • git diff --check

At a 390 CSS-pixel viewport, the regression records a 374-pixel image inside its 374-pixel container, position: static, no transform, preserved 16:9 aspect ratio, visible caption and child content, following content below the component, and no fixture-level horizontal overflow.

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.

1 participant