Skip to content

Two columns are not displayed on the iPhone Duo unfolded in landscape #247

Description

@mickael-menu

Describe the bug

On the iPhone Duo unfolded in landscape, Readium CSS v1 shows a single column across the full width, even if two columns are forced. We expect two columns, as on an iPad in landscape.

Viewport dimensions measured on the device:

  • viewport: 951×545 (inner display)
  • screen: 466×678 (cover display)

Since Readium CSS v2 no longer handles automatic columns with media queries, this would be a hotfix on top of the latest v1 version, for clients that can't migrate to v2 before the Duo ships.

How to reproduce?

  1. Open any reflowable EPUB in a paginated reading app that uses Readium CSS v1 (e.g. the Readium Swift toolkit Test App).
  2. Unfold the iPhone Duo and rotate to landscape.
  3. Keep the default column count (auto) and font size.
  4. The text is laid out in a single column across the viewport.

Readium CSS version

1.1.0

Platforms

iOS 27.1

Browsers

WebKit (WKWebView)

Additional context

The Swift toolkit has a proposed fix in readium/swift-toolkit#903. It swaps both media queries for a viewport-based one:

@media screen and (min-width: 59.375em) and (orientation: landscape), screen and (horizontal-viewport-segments: 2) {
  • The query no longer uses device-width or device-height.
  • The threshold drops from 960px to 950px (59.375em), so the Duo's 951px viewport matches.
  • Two columns now require landscape. As a side effect, a 13" iPad in portrait (1032px wide) gets one column instead of two.
  • A horizontal-viewport-segments: 2 arm handles the half-folded posture.

Something to decide before merging:

  • Is the iPad portrait change acceptable, or should portrait keep two columns above some larger width?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions