<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Keishin Nishiura</title>
    <description>The latest articles on DEV Community by Keishin Nishiura (@keishin_nishiura).</description>
    <link>https://dev.to/keishin_nishiura</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4120337%2F8fee2fce-2306-4567-8790-778e90183d1d.PNG</url>
      <title>DEV Community: Keishin Nishiura</title>
      <link>https://dev.to/keishin_nishiura</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/keishin_nishiura"/>
    <language>en</language>
    <item>
      <title>Apple shipped a foldable iPhone. Safari still can't tell you it folded.</title>
      <dc:creator>Keishin Nishiura</dc:creator>
      <pubDate>Fri, 11 Sep 2026 07:08:41 +0000</pubDate>
      <link>https://dev.to/keishin_nishiura/apple-shipped-a-foldable-iphone-safari-still-cant-tell-you-it-folded-565a</link>
      <guid>https://dev.to/keishin_nishiura/apple-shipped-a-foldable-iphone-safari-still-cant-tell-you-it-folded-565a</guid>
      <description>&lt;p&gt;Apple announced the iPhone Duo, its first foldable, on September 10th. Most of the coverage is about the hinge and the $1,999 price tag. I want to talk about something narrower: what the two displays actually measure, and what that does to CSS you have already written.&lt;/p&gt;

&lt;p&gt;Short version:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Folded and unfolded, both displays sit at roughly &lt;strong&gt;1 : 1.42&lt;/strong&gt;. Not 9 : 19.5. Not close to it.&lt;/li&gt;
&lt;li&gt;Logical resolution works out to about &lt;strong&gt;466 x 678pt folded&lt;/strong&gt; and &lt;strong&gt;890 x 626pt unfolded&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The web standard for foldables, CSS Viewport Segments, is &lt;strong&gt;Chrome and Edge only&lt;/strong&gt;. Safari does not support it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the first foldable device that runs Safari ships without the API designed to detect folds. That is the interesting part.&lt;/p&gt;

&lt;h2&gt;
  
  
  The numbers
&lt;/h2&gt;

&lt;p&gt;Straight from Apple's spec sheet:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Inner (unfolded)&lt;/th&gt;
&lt;th&gt;Outer (folded)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Size&lt;/td&gt;
&lt;td&gt;7.6" (7.58" actual)&lt;/td&gt;
&lt;td&gt;5.4" (5.36" actual)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resolution&lt;/td&gt;
&lt;td&gt;1,878 x 2,670 px&lt;/td&gt;
&lt;td&gt;1,398 x 2,034 px&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Density&lt;/td&gt;
&lt;td&gt;430 ppi&lt;/td&gt;
&lt;td&gt;460 ppi&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Body&lt;/td&gt;
&lt;td&gt;164.6 x 117.8 mm&lt;/td&gt;
&lt;td&gt;84.1 x 117.8 mm&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Run the ratios. The outer display is 1,398 : 2,034, which is about &lt;strong&gt;1 : 1.45&lt;/strong&gt;. The inner display becomes landscape when you open it, so 2,670 : 1,878, about &lt;strong&gt;1.42 : 1&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Apple matched the aspect ratio across both displays. Folded, it is passport-shaped. Unfolded, it is the same shape rotated and roughly doubled.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7ey9lqyrmkx58ulc97u2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7ey9lqyrmkx58ulc97u2.png" alt="Three phone outlines compared side by side: a typical iPhone at about 1:2.16, the iPhone Duo folded at about 1:1.45, and the iPhone Duo unfolded in landscape at about 1.42:1 with a dashed line marking the fold" width="799" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the part that surprised me. I assumed the folded state would be a normal narrow phone screen that existing mobile CSS would absorb, and that only the unfolded state needed thought.&lt;/p&gt;

&lt;p&gt;It is not. At 1 : 1.45, &lt;strong&gt;the folded state is already outside what your mobile breakpoints assume.&lt;/strong&gt; A typical iPhone is around 1 : 2.16. This is a different shape in both states.&lt;/p&gt;

&lt;h2&gt;
  
  
  Converting to CSS pixels
&lt;/h2&gt;

&lt;p&gt;Apple does not publish logical resolution, so divide the advertised resolution by 3:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;State&lt;/th&gt;
&lt;th&gt;Logical resolution (approx.)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Outer, portrait&lt;/td&gt;
&lt;td&gt;about 466 x 678pt&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Inner, landscape&lt;/td&gt;
&lt;td&gt;about 890 x 626pt&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Treat these as estimates. Safari's actual viewport will be smaller once the address bar and toolbar are subtracted, and the only way to know for sure is to read &lt;code&gt;window.innerWidth&lt;/code&gt; and &lt;code&gt;innerHeight&lt;/code&gt; on a real device.&lt;/p&gt;

&lt;p&gt;Still, the estimates are enough to see three problems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;466pt is an awkward width.&lt;/strong&gt; Typical iPhones in portrait land between 390 and 440pt. The Duo folded is wider than all of them, but only 678pt tall. If you gate your mobile layout on something like &lt;code&gt;max-width: 480px&lt;/code&gt;, the folded state lands right on the edge of that rule.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;890pt landscape will match your tablet styles.&lt;/strong&gt; But only 626pt of height comes with it. Tall hero sections and full-screen modals that assume a tablet's vertical room will feel cramped.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The viewport changes mid-session.&lt;/strong&gt; Not through rotation, through folding. Any code that measures the viewport once on first paint and holds onto that value will be wrong the moment the user opens the device. And anything that lands under the hinge, a button or a form field, becomes awkward to touch.&lt;/p&gt;

&lt;h2&gt;
  
  
  The standard exists. Safari doesn't implement it.
&lt;/h2&gt;

&lt;p&gt;There is a spec for exactly this problem: CSS Viewport Segments. When the viewport is physically split, you get the segment count and each segment's geometry from both CSS and JavaScript.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.layout&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* two segments side by side = opened like a book */&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;horizontal-viewport-segments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;.layout&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.list&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;viewport-segment-width&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c"&gt;/* reserve the hinge itself so nothing straddles it */&lt;/span&gt;
  &lt;span class="nc"&gt;.hinge&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;viewport-segment-left&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;-&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;viewport-segment-right&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.detail&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;viewport-segment-width&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;segments&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;viewport&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;segments&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;

&lt;span class="nx"&gt;segments&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;segment&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`segment &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;segment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;px x &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;segment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;px`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On a non-folding device you get a single-element array describing the whole viewport, so you do not need a separate branch.&lt;/p&gt;

&lt;p&gt;Support, though:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Browser&lt;/th&gt;
&lt;th&gt;Support&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Chrome / Chrome for Android&lt;/td&gt;
&lt;td&gt;138+ (June 2025)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edge&lt;/td&gt;
&lt;td&gt;138+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Firefox&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Safari / Safari on iOS&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The foldable API lives in Chromium. The foldable iPhone does not run Chromium. Whether iOS 27's Safari changes that is worth watching in the release notes, but as of today, you cannot build on it.&lt;/p&gt;

&lt;p&gt;Which leaves one workable strategy: &lt;strong&gt;make your layouts survive any width and any aspect ratio, without asking the browser where the fold is.&lt;/strong&gt; Boring advice. It also happens to be the advice that pays off on every device, not just this one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to actually do
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Branch on container width, not viewport width.&lt;/strong&gt; Media queries ask how big the viewport is. Container queries ask how much room this element was given. When unexpected widths show up, the second question is the more robust one.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.card-area&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;container-type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-size&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@container&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;640px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;.card&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;grid-template-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;16px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Audit your hard-coded breakpoints.&lt;/strong&gt; Look for values like &lt;code&gt;max-width: 767px&lt;/code&gt; that were picked with a specific device in mind. Unfolded, this thing can match either your phone styles or your tablet styles and look wrong under both. The number matters less than what you are switching at that number.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stop caching the first measurement.&lt;/strong&gt; If you read &lt;code&gt;window.innerWidth&lt;/code&gt; once during init and keep it, folding breaks you. Use &lt;code&gt;resize&lt;/code&gt; or a &lt;code&gt;ResizeObserver&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;layoutMode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;resolveLayoutMode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerWidth&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;resize&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;next&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;resolveLayoutMode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerWidth&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;next&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="nx"&gt;layoutMode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;layoutMode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nf"&gt;applyLayout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;layoutMode&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Check landscape.&lt;/strong&gt; iOS 27 is bringing landscape layouts back to system apps that had been portrait-only, which reads as groundwork for the inner display. If you have pages nobody has opened sideways in two years, now is a good time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test without hardware.&lt;/strong&gt; Register 466 x 678 and 890 x 626 as custom devices in Chrome DevTools and toggle between them. For segment behaviour specifically, there is a polyfill: &lt;a href="https://github.com/foldable-devices/viewportsegments-css-polyfill" rel="noopener noreferrer"&gt;foldable-devices/viewportsegments-css-polyfill&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The native side
&lt;/h2&gt;

&lt;p&gt;iOS 27's frameworks reportedly include a &lt;code&gt;foldState&lt;/code&gt; property and an &lt;code&gt;angleDegrees&lt;/code&gt; value for the hinge, neither of which existed in iOS 26. And at WWDC 2026, Apple pushed developers to design for a range of sizes and aspect ratios instead of specific screen dimensions. The wider rollout of window resizing for iPhone apps is part of the same direction.&lt;/p&gt;

&lt;p&gt;If you ship a hybrid app with a &lt;code&gt;WKWebView&lt;/code&gt; in it, this lands on both sides of the stack. A resizable native container means the web view inside it has to be resizable too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Should you build foldable support now?
&lt;/h2&gt;

&lt;p&gt;Probably not as a line item. Foldables are still a low single-digit percentage of smartphone shipments, and the Duo's initial supply is expected to be limited. Building dedicated branching for it is hard to justify today.&lt;/p&gt;

&lt;p&gt;What I would actually do, in order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Now:&lt;/strong&gt; open your existing site at 466 x 678 and 890 x 626, fix whatever visibly breaks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Next refactor:&lt;/strong&gt; move hard-coded breakpoints toward container queries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Later:&lt;/strong&gt; segment-aware layouts, once Safari's support status changes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Framing this as "foldable support" invites scope. Framing it as a responsive-design health check gets the same work done and is easier to explain to whoever is paying for it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;The thing I keep coming back to is that the folded state is already off-spec. I expected the interesting problem to be the unfolded screen, and the actual finding was that both states are shapes we have not designed for.&lt;/p&gt;

&lt;p&gt;New form factors keep rewarding the same thing: layouts that were never that attached to specific numbers in the first place.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.apple.com/iphone-duo/specs/" rel="noopener noreferrer"&gt;Apple - iPhone Duo specs&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/horizontal-viewport-segments" rel="noopener noreferrer"&gt;MDN - horizontal-viewport-segments&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Viewport/segments" rel="noopener noreferrer"&gt;MDN - Viewport: segments&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.chrome.com/blog/viewport-segments-api-shipped" rel="noopener noreferrer"&gt;Chrome for Developers - Support foldable devices with the Viewport Segments API&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://web-platform-dx.github.io/web-features-explorer/features/viewport-segments" rel="noopener noreferrer"&gt;web-features - Viewport segments&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>css</category>
      <category>ios</category>
      <category>frontend</category>
      <category>apple</category>
    </item>
  </channel>
</rss>
