v135 ยท css
CSS Logical Overflow
The overflow-inline and overflow-block CSS properties allow setting overflow in inline and block direction relative to the writing-mode. In a horizontal writing-mode overflow-inline maps to overflow-x, while in a vertical writing-mode it maps to overflow-y.
concepts
-
overflow-inline/block
Live matrix — pick writing-mode, then watch
overflow-inlineandoverflow-blockmap onto the right physical axis. -
RTL scroller, three writing modes
One stylesheet, three reading directions. The same
overflow-inline: autorule produces an LTR English carousel, a RTL Arabic carousel, and a vertical Japanese carousel. -
Writing-mode overflow lab
Pick a writing-mode + direction + overflow values and watch the resolved physical axes update in real time. Shows exactly how
overflow-blockmaps ontooverflow-yvsoverflow-xfor every combination. -
i18n Scroll Demo
Side-by-side comparison of overflow-inline vs overflow-x across horizontal LTR, horizontal RTL, and vertical-rl writing modes. Physical properties break in vertical mode; logical properties follow the text flow.
-
Bidi chat
A two-panel chat โ left panel in English (LTR), right in Arabic (RTL). Both use
overflow-block: auto; overflow-inline: hidden. The logical properties automatically scroll the block axis and clip inline in each respective direction. Type messages into either panel to try it live.
why it shipped
Without the logical variants of overflow the author needs to know whether the writing-mode is horizontal or vertical and set overflow-x or overflow-y based on that knowledge. The logical variants lets the author make the overflow directions respond to the writing-mode.