Almost every responsive layout is tested at two sizes: something around 390×844, and something wide. Then a foldable shows up, the user unfolds it, and the page does one of two things — stretches a phone layout across 750 px, or jumps to a two-column tablet layout with a vertical strip of dead space running down the middle of the text.
Neither is a rendering bug. Both are assumptions: that a device has one viewport, that width alone tells you the layout, and that the breakpoints you picked sit somewhere real.
A foldable is two viewports, not one
Here are the CSS pixel widths of the eight devices I keep in the test set (cover screen / unfolded inner screen):
Device Cover Inner
iPhone Duo 387 790
Galaxy Z Fold 7 412 750
Galaxy Z Flip 7 361 411
Mate X7 411 842
Pixel Fold 412 790
Find N5 412 824
Mate XT (tri-fold) 384 1080
Razr 60 Ultra 412 412
Two things fall out of that table immediately.
Cover screens are narrower than the phone you tested. The range is 361–412.…