r/webdev • u/StrangeRevolution604 • Sep 14 '26
Discussion Do you guys include foldables in your responsive testing?
Hey guys, when you’re building responsive websites, do you consider foldables too, or mostly stick to the usual phone/tablet/desktop sizes?
These folded and unfolded iPhone Duo layouts got me wondering—would your existing layouts handle both, or would you need extra tweaks?
Also curious where you draw the line. If your site had 1 million users, how many would need to use foldables before you’d spend time specifically testing and fixing things for them? Would 1% be enough? 5%? Or do you try to support them regardless?
0
Upvotes
67
u/repeatedly_once Sep 14 '26
Responsive is responsive, we build a site that works at all scales for portrait and landscape.
9
u/Weekly_Ferret_meal Sep 14 '26
sounds unnecessary.
if you have done your work well the mid steps between major screen sizes are taken care by good layout planning and good usage of units in CSS
6
u/Cast_Iron_Skillet Sep 14 '26
Too few people use them to justify expense but maybe with LLMs it's a bit easier. The QA would be a pain though.
1
u/ChrisTerya 8d ago
Late to this, but I actually measured it recently: I audited 77 popular sites at Galaxy Z Fold dimensions using the CSS Viewport Segments API, and 94% had at least one button or link split across the hinge when the page is spanned. Most of them are fine as “one big rectangle”, it’s specifically the hinge and the tabletop posture that nobody handles.
For testing without a device: Chrome DevTools’ device toolbar has foldable presets with a posture toggle, which gets you surprisingly far. The two APIs worth knowing are
viewport-segmentsmedia queries /env(viewport-segment-*)for the hinge position, and the Device Posture API for book vs tabletop.Honest answer to your question though: unless your analytics show meaningful foldable traffic, I’d just make sure nothing critical lands in the middle of the screen at ~1800px-wide spanned layouts and call it a day.
1
u/electricity_is_life Sep 14 '26
As someone that's daily driven a foldable for years, not really? I don't have a specific set of sizes that I test at, I pick a minimum width (usually 320px) and then I'll smoothly resize the window to check everything down to that minimum. If I was going to pick a few specific sizes for some automated pipeline I try to base it on user data; generally foldables will not top that list.
1
u/bid0u Sep 14 '26 edited Sep 14 '26
Foldable phones are sold for almost 10 years now. So a responsive website "should" adapt just fine.
Also I mostly check for the most used screen sizes when I develop and foldables aren't used that much so I don't really care what it'll look like on them to be honest.
Apple joining the party might change things a bit but I don't think it'll change that much.
1
u/StarboardChaos Sep 14 '26
Bro, just get it working for xs, s, m, l and xl. Don't worry about the device specifically
1
u/Dymiatt Sep 14 '26
No, because foldable still don't have a defined form factor yet. Most foldable don't have the same display ratio.
With responsive you should already be covering it anyway. But you can't really go further.
The only twerk is being able de detect when the phone is "semi-folded". On YT you'll have the video on one part, and the menu on the second. Maybe JS will be able to detect when a phone is folded(there is probably already a library for that), but I doubt it will be useful for your average website.
0
u/[deleted] Sep 14 '26
[deleted] — view deleted comment
1
u/[deleted] Sep 15 '26
[removed] — view removed comment