T27.AI

Blog

A phone web view needed an orientation gate

2026-09-10 · 4 min read

[measured] Merged PR #983 changed 3 CSS files after a 390×480 Chrome check exposed a phone layout selected by height instead of orientation.

#Web#CSS#Reproducibility#Testing

[measured] A merged change to the Queen phone shell addressed a responsive failure in a Telegram Mini App web view. The receipt is PR #983 and its merge commit a368d8126788c09bcac29169dccd9602ea9b3ac8.

The trigger was a Chrome check at 390×480. The old phone rule required max-width: 640px together with min-height: 501px. The short portrait viewport therefore missed the phone branch, while the desktop shell and landscape rules could overlap.

What changed

ReceiptValue
Files changed3 CSS files
Diff25 additions, 6 deletions
Problem viewport390×480
Portrait control390×844
Landscape control844×390

The phone stylesheet now gates the phone shell on (orientation: portrait). The landscape blocks in Queen.css and QueenCatalogHive.css now require (orientation: landscape). The commit reports that 844×390 keeps its previous behaviour, while 390×480 renders like the 390×844 phone layout.

@media (max-width: 640px) and (orientation: portrait) { /* phone shell */ }
@media (max-height: 500px) and (orientation: landscape) { /* landscape shell */ }

Why the distinction matters

A web view inside Telegram is shorter than the physical phone because application chrome and Telegram chrome consume part of the frame. The commit describes about 414px remaining on a 667pt iPhone before a compact web view is expanded. That makes height a changing symptom, while orientation is the axis the layout is trying to identify.

When a web view can lose height to surrounding chrome, test the controlling axis instead of adding another height threshold.

What this does not prove

The engineering value is a small but reusable debugging rule: record width, height, orientation, and web-view chrome separately. A responsive fix is easier to reproduce when its failing viewport and control viewport are part of the receipt.

What this does not settle

Receipts

Work with me

Want this kind of check on your own design?

I audit RTL and build independent, bit-exact models, then take the result through synthesis and, when useful, onto an Artix-7 board. The first conformance module is free.