Mobile guard: HtmlBlock wrapper never gets a box; phone net is media + per-table/pre scroll only

Review of bb4fb75: overflow-x:auto on [data-wsb-html] forced overflow-y:auto (clipped dropdowns/shadows),
broke position:sticky inside customer HTML, and display:block!important merged multi-root blocks that are
direct flex/grid items. Now the wrapper stays display:contents on every viewport and no rule targets it;
at <=767px only its descendants are touched: media max-width:100% (img/video height:auto), and a table or
<pre> becomes its own sideways scroller (not when already inside an inline overflow wrapper). No
overflow-wrap:anywhere (it shrank min-content); body{overflow-wrap:break-word} inherits through the wrapper.
Deliberately wide customer markup (fixed widths, px grids) is clipped as before; the publish warning is
its guard, and its wording now says the excess is cut off. width= attributes are no longer flagged (they
size only media and tables, which the net handles). stripMediaBlocks lowercases once.

Browser suite: htmlblocks probes at every width (wrapper display:contents, sticky sticks, absolutely
positioned dropdown visible on top, multi-root block = separate flex items / grid cells, bare table
scrolls on its own); new htmlwide doc asserts wide blocks stay clipped and the page never scrolls sideways.
All probes fail on bb4fb75's net and pass now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Opus 5.5 committed 2026-11-01 15:09:22 -08:00
1 parent bb4fb7548b
commit cfeeef37ce
10 files changed
+175 -89

No files matched your search

+6 -7
View File
@@ -2374,25 +2374,24 @@ body {
}
/* Mirrors of the published <=767px head rules (RESPONSIVE_CSS in utils/html-export.ts): component card
grids go to one column, long words wrap, customer HTML (HtmlBlock) scrolls sideways inside its own box. */
grids go to one column, long words wrap, media in customer HTML shrink and its tables/<pre> scroll on their own. */
.canvas-device-frame[data-device="mobile"] [data-wsb-grid] {
grid-template-columns: minmax(0, 1fr) !important;
}
.canvas-device-frame[data-device="mobile"] {
overflow-wrap: break-word;
}
.canvas-device-frame[data-device="mobile"] [data-wsb-html] {
max-width: 100%;
min-width: 0;
overflow-x: auto;
overflow-wrap: anywhere;
}
.canvas-device-frame[data-device="mobile"] [data-wsb-html] :is(img, video, iframe, embed, object, svg, canvas) {
max-width: 100%;
}
.canvas-device-frame[data-device="mobile"] [data-wsb-html] :is(img, video) {
height: auto;
}
.canvas-device-frame[data-device="mobile"] [data-wsb-html] :is(table, pre):not([style*="overflow"] *) {
display: block;
max-width: 100%;
overflow-x: auto;
}
.canvas-device-frame:not([data-device="desktop"]) [data-fullwidth] {
width: 100% !important;