[{"data":1,"prerenderedAt":2173},["ShallowReactive",2],{"page-\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Foverscroll-behavior-for-nested-scrolling\u002F":3,"content-all-pages":1609,"live-demo:snap-overscroll-contain":2167},{"id":4,"title":5,"body":6,"description":1589,"extension":1590,"meta":1591,"navigation":354,"path":1605,"seo":1606,"stem":1607,"__hash__":1608},"content\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Foverscroll-behavior-for-nested-scrolling\u002Findex.md","overscroll-behavior: Taming Nested Scrolling, Pull-to-Refresh and Back-Swipe",{"type":7,"value":8,"toc":1578},"minimark",[9,18,36,41,49,153,156,160,167,171,174,1150,1183,1194,1269,1277,1294,1298,1305,1323,1330,1334,1341,1451,1458,1475,1479,1494,1498,1505,1522,1537,1543,1547,1575],[10,11,13,17],"h1",{"id":12},"overscroll-behavior-taming-nested-scrolling-pull-to-refresh-and-back-swipe",[14,15,16],"code",{},"overscroll-behavior",": Taming Nested Scrolling, Pull-to-Refresh and Back-Swipe",[19,20,21,22,24,25,30,31,35],"p",{},"A dropdown list scrolls to its last option, the user keeps scrolling, and the entire page lurches down behind it. A chat panel reaches its oldest message, the user drags a little further, and the browser starts a pull-to-refresh that throws away their draft. A horizontal carousel hits its first slide, the user keeps swiping, and the browser navigates back a page. All three are the same mechanism — scroll chaining and overscroll gestures — and all three are fixed with one property. This page explains what happens at a scroll boundary and how ",[14,23,16],{}," controls it. It sits in ",[26,27,29],"a",{"href":28},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002F","Scroll Snap & Overflow Layouts"," within the ",[26,32,34],{"href":33},"\u002Fmastering-container-queries-responsive-layouts\u002F","Mastering Container Queries & Responsive Layouts"," guide.",[37,38,40],"h2",{"id":39},"why-the-page-moves-when-a-panel-reaches-its-end","Why the page moves when a panel reaches its end",[19,42,43,44,48],{},"Scrolling in browsers is hierarchical. When a scroll gesture starts over an element, the browser scrolls the nearest scroll container under the pointer. If that container is already at its limit in the gesture's direction, the browser does not discard the rest of the gesture; it ",[45,46,47],"em",{},"chains"," it to the next scrollable ancestor. Eventually the chain reaches the root, and at the root the browser applies its own boundary effects: the rubber-band bounce on Apple platforms, the glow on Android, pull-to-refresh at the top of the page on mobile, and edge swipes for history navigation on some platforms.",[50,51,57,58,57,62,57,66,57,74,57,84,57,89,57,94,57,98,57,102,57,106,57,113,57,117,57,121,57,128,57,132,57,138,57,144,57,147],"svg",{"viewBox":52,"role":53,"ariaLabel":54,"xmlns":55,"style":56},"0 0 720 320","img","Scroll chaining from an inner list to the page and then to browser gestures, with overscroll-behavior contain stopping the chain at the list","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","width:100%;height:auto;max-width:720px;margin:2rem 0","\n  ",[59,60,61],"title",{},"The scroll chain and where contain cuts it",[63,64,65],"desc",{},"Three stacked levels: an inner list, the page scroller, and browser gestures such as pull-to-refresh and back-swipe. Arrows show leftover scroll passing upward from the list to the page to the browser. A barrier labelled overscroll-behavior contain sits between the list and the page.",[67,68,73],"text",{"textAnchor":69,"x":70,"y":71,"style":72},"middle","360","26","text-anchor:middle;fill:currentColor;font:700 17px sans-serif","Leftover scroll travels upward until something stops it",[75,76],"rect",{"x":77,"y":78,"width":79,"height":80,"rx":81,"fill":82,"opacity":83},"200","230","320","56","10","#7aa2ff","0.34",[67,85,88],{"textAnchor":69,"x":70,"y":86,"style":87},"256","text-anchor:middle;fill:currentColor;font:600 13px sans-serif","Inner list (at its end)",[67,90,93],{"textAnchor":69,"x":70,"y":91,"style":92},"276","text-anchor:middle;fill:currentColor;font:12px sans-serif","gesture continues",[75,95],{"x":77,"y":96,"width":79,"height":80,"rx":81,"fill":82,"opacity":97},"140","0.18",[67,99,101],{"textAnchor":69,"x":70,"y":100,"style":87},"166","Page scroller",[67,103,105],{"textAnchor":69,"x":70,"y":104,"style":92},"186","scrolls unexpectedly",[75,107],{"x":77,"y":108,"width":79,"height":80,"rx":81,"fill":109,"stroke":110,"strokeWidth":111,"opacity":112},"50","none","currentColor","1.5","0.6",[67,114,116],{"textAnchor":69,"x":70,"y":115,"style":87},"76","Browser gestures",[67,118,120],{"textAnchor":69,"x":70,"y":119,"style":92},"96","pull-to-refresh, back-swipe",[122,123],"line",{"x1":124,"y1":125,"x2":124,"y2":126,"stroke":110,"strokeWidth":127,"opacity":112},"150","228","110","2",[129,130],"path",{"d":131,"fill":110,"opacity":112},"M142 122 L150 106 L158 122 Z",[67,133,137],{"textAnchor":134,"x":96,"y":135,"style":136},"end","172","text-anchor:end;fill:currentColor;font:12px sans-serif","chaining",[122,139],{"x1":140,"y1":141,"x2":142,"y2":141,"stroke":82,"strokeWidth":143},"540","212","700","5",[122,145],{"x1":77,"y1":141,"x2":146,"y2":141,"stroke":82,"strokeWidth":143},"520",[67,148,152],{"textAnchor":69,"x":149,"y":150,"style":151},"620","236","text-anchor:middle;fill:currentColor;font:12px ui-monospace,monospace","contain cuts here",[19,154,155],{},"This design is usually helpful. A reader scrolling an article with an embedded code block does not want the code block to trap their wheel. But for panels that are meant to be self-contained — menus, sheets, chat logs, maps, carousels — chaining turns the edge of the panel into a trapdoor.",[37,157,159],{"id":158},"the-complete-implementation","The complete implementation",[19,161,162,163,166],{},"The demo isolates the mechanism. Two identical lists sit inside a scrolling panel; only the right-hand list has ",[14,164,165],{},"overscroll-behavior-y: contain",". Scroll to the bottom of each list with a wheel or trackpad and keep scrolling.",[168,169],"live-demo",{"name":170},"snap-overscroll-contain",[19,172,173],{},"The page below has three self-contained scrollers — a dropdown list, a chat log and a horizontal carousel — each with the appropriate setting, and a modal that locks the page behind it.",[175,176,181],"pre",{"className":177,"code":178,"language":179,"meta":180,"style":180},"language-html shiki shiki-themes github-light-high-contrast github-dark-high-contrast","\u003C!doctype html>\n\u003Chtml lang=\"en\">\n\u003Chead>\n\u003Cmeta charset=\"utf-8\">\n\u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\u003Ctitle>overscroll-behavior\u003C\u002Ftitle>\n\u003Cstyle>\n  body { margin: 0; font: 15px\u002F1.5 system-ui, sans-serif; }\n\n  \u002F* A long dropdown: reaching its last option must not scroll the page. *\u002F\n  .menu {\n    max-height: 14rem;\n    overflow-y: auto;\n    overscroll-behavior-y: contain;   \u002F* keep the local bounce, stop chaining *\u002F\n  }\n\n  \u002F* A chat log that users drag upward to load history: without this,\n     pulling past the oldest message triggers pull-to-refresh. *\u002F\n  .chat-log {\n    height: 60svh;\n    overflow-y: auto;\n    overscroll-behavior-y: contain;\n  }\n\n  \u002F* A horizontal carousel: swiping past the first slide must not trigger\n     the browser's back navigation gesture. *\u002F\n  .carousel {\n    display: flex;\n    gap: 1rem;\n    overflow-x: auto;\n    overscroll-behavior-x: contain;\n    scroll-snap-type: x mandatory;\n  }\n  .carousel > * { flex: 0 0 80%; scroll-snap-align: start; }\n\n  \u002F* Modal: stop chaining from the dialog body, and lock the page itself\n     while any modal dialog is open. :has() does it without script. *\u002F\n  .modal__body {\n    max-height: 70dvh;\n    overflow-y: auto;\n    overscroll-behavior: contain;\n  }\n  :root:has(dialog[open].modal) {\n    overflow: hidden;\n    \u002F* Reserve the scrollbar's space so the page does not shift sideways\n       when the scrollbar disappears. *\u002F\n    scrollbar-gutter: stable;\n  }\n\n  \u002F* Scrollable regions must be keyboard reachable and visibly focused. *\u002F\n  :is(.menu, .chat-log, .carousel, .modal__body):focus-visible {\n    outline: 2px solid #2563eb;\n    outline-offset: 2px;\n  }\n\u003C\u002Fstyle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cul class=\"menu\" tabindex=\"0\" aria-label=\"Countries\">\u003Cli>Albania\u003C\u002Fli>\u003Cli>Algeria\u003C\u002Fli>\u003Cli>Andorra\u003C\u002Fli>\u003C\u002Ful>\n  \u003Cdiv class=\"chat-log\" tabindex=\"0\" role=\"log\" aria-label=\"Messages\">\u003Cp>Oldest message\u003C\u002Fp>\u003C\u002Fdiv>\n  \u003Cdiv class=\"carousel\" tabindex=\"0\" aria-label=\"Photos, scroll horizontally\">\u003Cdiv>One\u003C\u002Fdiv>\u003Cdiv>Two\u003C\u002Fdiv>\u003C\u002Fdiv>\n  \u003Cdialog class=\"modal\" aria-labelledby=\"m-title\">\n    \u003Ch2 id=\"m-title\">Terms\u003C\u002Fh2>\n    \u003Cdiv class=\"modal__body\" tabindex=\"0\">Long terms text…\u003C\u002Fdiv>\n  \u003C\u002Fdialog>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n","html","",[14,182,183,202,222,232,250,275,289,299,349,356,363,372,389,402,419,425,430,436,442,450,466,477,488,493,498,504,510,518,531,546,558,570,586,591,631,636,642,648,656,671,682,694,699,726,739,745,751,760,765,770,776,810,830,844,849,859,868,878,947,998,1049,1073,1095,1122,1132,1141],{"__ignoreMap":180},[184,185,187,191,195,199],"span",{"class":122,"line":186},1,[184,188,190],{"class":189},"suds8","\u003C!",[184,192,194],{"class":193},"sne4z","doctype",[184,196,198],{"class":197},"s-5SL"," html",[184,200,201],{"class":189},">\n",[184,203,205,208,210,213,216,220],{"class":122,"line":204},2,[184,206,207],{"class":189},"\u003C",[184,209,179],{"class":193},[184,211,212],{"class":197}," lang",[184,214,215],{"class":189},"=",[184,217,219],{"class":218},"sT6z2","\"en\"",[184,221,201],{"class":189},[184,223,225,227,230],{"class":122,"line":224},3,[184,226,207],{"class":189},[184,228,229],{"class":193},"head",[184,231,201],{"class":189},[184,233,235,237,240,243,245,248],{"class":122,"line":234},4,[184,236,207],{"class":189},[184,238,239],{"class":193},"meta",[184,241,242],{"class":197}," charset",[184,244,215],{"class":189},[184,246,247],{"class":218},"\"utf-8\"",[184,249,201],{"class":189},[184,251,253,255,257,260,262,265,268,270,273],{"class":122,"line":252},5,[184,254,207],{"class":189},[184,256,239],{"class":193},[184,258,259],{"class":197}," name",[184,261,215],{"class":189},[184,263,264],{"class":218},"\"viewport\"",[184,266,267],{"class":197}," content",[184,269,215],{"class":189},[184,271,272],{"class":218},"\"width=device-width, initial-scale=1\"",[184,274,201],{"class":189},[184,276,278,280,282,285,287],{"class":122,"line":277},6,[184,279,207],{"class":189},[184,281,59],{"class":193},[184,283,284],{"class":189},">overscroll-behavior\u003C\u002F",[184,286,59],{"class":193},[184,288,201],{"class":189},[184,290,292,294,297],{"class":122,"line":291},7,[184,293,207],{"class":189},[184,295,296],{"class":193},"style",[184,298,201],{"class":189},[184,300,302,305,308,311,314,317,320,323,325,328,332,335,337,340,343,346],{"class":122,"line":301},8,[184,303,304],{"class":193},"  body",[184,306,307],{"class":189}," { ",[184,309,310],{"class":197},"margin",[184,312,313],{"class":189},": ",[184,315,316],{"class":197},"0",[184,318,319],{"class":189},"; ",[184,321,322],{"class":197},"font",[184,324,313],{"class":189},[184,326,327],{"class":197},"15",[184,329,331],{"class":330},"sHUrx","px",[184,333,334],{"class":189},"\u002F",[184,336,111],{"class":197},[184,338,339],{"class":197}," system-ui",[184,341,342],{"class":189},", ",[184,344,345],{"class":197},"sans-serif",[184,347,348],{"class":189},"; }\n",[184,350,352],{"class":122,"line":351},9,[184,353,355],{"emptyLinePlaceholder":354},true,"\n",[184,357,359],{"class":122,"line":358},10,[184,360,362],{"class":361},"sLBg1","  \u002F* A long dropdown: reaching its last option must not scroll the page. *\u002F\n",[184,364,366,369],{"class":122,"line":365},11,[184,367,368],{"class":197},"  .menu",[184,370,371],{"class":189}," {\n",[184,373,375,378,380,383,386],{"class":122,"line":374},12,[184,376,377],{"class":197},"    max-height",[184,379,313],{"class":189},[184,381,382],{"class":197},"14",[184,384,385],{"class":330},"rem",[184,387,388],{"class":189},";\n",[184,390,392,395,397,400],{"class":122,"line":391},13,[184,393,394],{"class":197},"    overflow-y",[184,396,313],{"class":189},[184,398,399],{"class":197},"auto",[184,401,388],{"class":189},[184,403,405,408,410,413,416],{"class":122,"line":404},14,[184,406,407],{"class":197},"    overscroll-behavior-y",[184,409,313],{"class":189},[184,411,412],{"class":197},"contain",[184,414,415],{"class":189},";   ",[184,417,418],{"class":361},"\u002F* keep the local bounce, stop chaining *\u002F\n",[184,420,422],{"class":122,"line":421},15,[184,423,424],{"class":189},"  }\n",[184,426,428],{"class":122,"line":427},16,[184,429,355],{"emptyLinePlaceholder":354},[184,431,433],{"class":122,"line":432},17,[184,434,435],{"class":361},"  \u002F* A chat log that users drag upward to load history: without this,\n",[184,437,439],{"class":122,"line":438},18,[184,440,441],{"class":361},"     pulling past the oldest message triggers pull-to-refresh. *\u002F\n",[184,443,445,448],{"class":122,"line":444},19,[184,446,447],{"class":197},"  .chat-log",[184,449,371],{"class":189},[184,451,453,456,458,461,464],{"class":122,"line":452},20,[184,454,455],{"class":197},"    height",[184,457,313],{"class":189},[184,459,460],{"class":197},"60",[184,462,463],{"class":330},"svh",[184,465,388],{"class":189},[184,467,469,471,473,475],{"class":122,"line":468},21,[184,470,394],{"class":197},[184,472,313],{"class":189},[184,474,399],{"class":197},[184,476,388],{"class":189},[184,478,480,482,484,486],{"class":122,"line":479},22,[184,481,407],{"class":197},[184,483,313],{"class":189},[184,485,412],{"class":197},[184,487,388],{"class":189},[184,489,491],{"class":122,"line":490},23,[184,492,424],{"class":189},[184,494,496],{"class":122,"line":495},24,[184,497,355],{"emptyLinePlaceholder":354},[184,499,501],{"class":122,"line":500},25,[184,502,503],{"class":361},"  \u002F* A horizontal carousel: swiping past the first slide must not trigger\n",[184,505,507],{"class":122,"line":506},26,[184,508,509],{"class":361},"     the browser's back navigation gesture. *\u002F\n",[184,511,513,516],{"class":122,"line":512},27,[184,514,515],{"class":197},"  .carousel",[184,517,371],{"class":189},[184,519,521,524,526,529],{"class":122,"line":520},28,[184,522,523],{"class":197},"    display",[184,525,313],{"class":189},[184,527,528],{"class":197},"flex",[184,530,388],{"class":189},[184,532,534,537,539,542,544],{"class":122,"line":533},29,[184,535,536],{"class":197},"    gap",[184,538,313],{"class":189},[184,540,541],{"class":197},"1",[184,543,385],{"class":330},[184,545,388],{"class":189},[184,547,549,552,554,556],{"class":122,"line":548},30,[184,550,551],{"class":197},"    overflow-x",[184,553,313],{"class":189},[184,555,399],{"class":197},[184,557,388],{"class":189},[184,559,561,564,566,568],{"class":122,"line":560},31,[184,562,563],{"class":197},"    overscroll-behavior-x",[184,565,313],{"class":189},[184,567,412],{"class":197},[184,569,388],{"class":189},[184,571,573,576,578,581,584],{"class":122,"line":572},32,[184,574,575],{"class":197},"    scroll-snap-type",[184,577,313],{"class":189},[184,579,580],{"class":197},"x",[184,582,583],{"class":197}," mandatory",[184,585,388],{"class":189},[184,587,589],{"class":122,"line":588},33,[184,590,424],{"class":189},[184,592,594,596,599,602,604,606,608,610,613,616,619,621,624,626,629],{"class":122,"line":593},34,[184,595,515],{"class":197},[184,597,598],{"class":330}," >",[184,600,601],{"class":193}," *",[184,603,307],{"class":189},[184,605,528],{"class":197},[184,607,313],{"class":189},[184,609,316],{"class":197},[184,611,612],{"class":197}," 0",[184,614,615],{"class":197}," 80",[184,617,618],{"class":330},"%",[184,620,319],{"class":189},[184,622,623],{"class":197},"scroll-snap-align",[184,625,313],{"class":189},[184,627,628],{"class":197},"start",[184,630,348],{"class":189},[184,632,634],{"class":122,"line":633},35,[184,635,355],{"emptyLinePlaceholder":354},[184,637,639],{"class":122,"line":638},36,[184,640,641],{"class":361},"  \u002F* Modal: stop chaining from the dialog body, and lock the page itself\n",[184,643,645],{"class":122,"line":644},37,[184,646,647],{"class":361},"     while any modal dialog is open. :has() does it without script. *\u002F\n",[184,649,651,654],{"class":122,"line":650},38,[184,652,653],{"class":197},"  .modal__body",[184,655,371],{"class":189},[184,657,659,661,663,666,669],{"class":122,"line":658},39,[184,660,377],{"class":197},[184,662,313],{"class":189},[184,664,665],{"class":197},"70",[184,667,668],{"class":330},"dvh",[184,670,388],{"class":189},[184,672,674,676,678,680],{"class":122,"line":673},40,[184,675,394],{"class":197},[184,677,313],{"class":189},[184,679,399],{"class":197},[184,681,388],{"class":189},[184,683,685,688,690,692],{"class":122,"line":684},41,[184,686,687],{"class":197},"    overscroll-behavior",[184,689,313],{"class":189},[184,691,412],{"class":197},[184,693,388],{"class":189},[184,695,697],{"class":122,"line":696},42,[184,698,424],{"class":189},[184,700,702,705,708,711,714,717,720,723],{"class":122,"line":701},43,[184,703,704],{"class":197},"  :root:has",[184,706,707],{"class":189},"(",[184,709,710],{"class":193},"dialog",[184,712,713],{"class":189},"[",[184,715,716],{"class":197},"open",[184,718,719],{"class":189},"]",[184,721,722],{"class":197},".modal",[184,724,725],{"class":189},") {\n",[184,727,729,732,734,737],{"class":122,"line":728},44,[184,730,731],{"class":197},"    overflow",[184,733,313],{"class":189},[184,735,736],{"class":197},"hidden",[184,738,388],{"class":189},[184,740,742],{"class":122,"line":741},45,[184,743,744],{"class":361},"    \u002F* Reserve the scrollbar's space so the page does not shift sideways\n",[184,746,748],{"class":122,"line":747},46,[184,749,750],{"class":361},"       when the scrollbar disappears. *\u002F\n",[184,752,754,757],{"class":122,"line":753},47,[184,755,756],{"class":197},"    scrollbar-gutter",[184,758,759],{"class":189},": stable;\n",[184,761,763],{"class":122,"line":762},48,[184,764,424],{"class":189},[184,766,768],{"class":122,"line":767},49,[184,769,355],{"emptyLinePlaceholder":354},[184,771,773],{"class":122,"line":772},50,[184,774,775],{"class":361},"  \u002F* Scrollable regions must be keyboard reachable and visibly focused. *\u002F\n",[184,777,779,782,784,787,789,792,794,797,799,802,805,808],{"class":122,"line":778},51,[184,780,781],{"class":197},"  :is",[184,783,707],{"class":189},[184,785,786],{"class":197},".menu",[184,788,342],{"class":189},[184,790,791],{"class":197},".chat-log",[184,793,342],{"class":189},[184,795,796],{"class":197},".carousel",[184,798,342],{"class":189},[184,800,801],{"class":197},".modal__body",[184,803,804],{"class":189},")",[184,806,807],{"class":197},":focus-visible",[184,809,371],{"class":189},[184,811,813,816,818,820,822,825,828],{"class":122,"line":812},52,[184,814,815],{"class":197},"    outline",[184,817,313],{"class":189},[184,819,127],{"class":197},[184,821,331],{"class":330},[184,823,824],{"class":197}," solid",[184,826,827],{"class":197}," #2563eb",[184,829,388],{"class":189},[184,831,833,836,838,840,842],{"class":122,"line":832},53,[184,834,835],{"class":197},"    outline-offset",[184,837,313],{"class":189},[184,839,127],{"class":197},[184,841,331],{"class":330},[184,843,388],{"class":189},[184,845,847],{"class":122,"line":846},54,[184,848,424],{"class":189},[184,850,852,855,857],{"class":122,"line":851},55,[184,853,854],{"class":189},"\u003C\u002F",[184,856,296],{"class":193},[184,858,201],{"class":189},[184,860,862,864,866],{"class":122,"line":861},56,[184,863,854],{"class":189},[184,865,229],{"class":193},[184,867,201],{"class":189},[184,869,871,873,876],{"class":122,"line":870},57,[184,872,207],{"class":189},[184,874,875],{"class":193},"body",[184,877,201],{"class":189},[184,879,881,884,887,890,892,895,898,900,903,906,908,911,914,917,920,922,924,926,929,931,933,935,938,940,943,945],{"class":122,"line":880},58,[184,882,883],{"class":189},"  \u003C",[184,885,886],{"class":193},"ul",[184,888,889],{"class":197}," class",[184,891,215],{"class":189},[184,893,894],{"class":218},"\"menu\"",[184,896,897],{"class":197}," tabindex",[184,899,215],{"class":189},[184,901,902],{"class":218},"\"0\"",[184,904,905],{"class":197}," aria-label",[184,907,215],{"class":189},[184,909,910],{"class":218},"\"Countries\"",[184,912,913],{"class":189},">\u003C",[184,915,916],{"class":193},"li",[184,918,919],{"class":189},">Albania\u003C\u002F",[184,921,916],{"class":193},[184,923,913],{"class":189},[184,925,916],{"class":193},[184,927,928],{"class":189},">Algeria\u003C\u002F",[184,930,916],{"class":193},[184,932,913],{"class":189},[184,934,916],{"class":193},[184,936,937],{"class":189},">Andorra\u003C\u002F",[184,939,916],{"class":193},[184,941,942],{"class":189},">\u003C\u002F",[184,944,886],{"class":193},[184,946,201],{"class":189},[184,948,950,952,955,957,959,962,964,966,968,971,973,976,978,980,983,985,987,990,992,994,996],{"class":122,"line":949},59,[184,951,883],{"class":189},[184,953,954],{"class":193},"div",[184,956,889],{"class":197},[184,958,215],{"class":189},[184,960,961],{"class":218},"\"chat-log\"",[184,963,897],{"class":197},[184,965,215],{"class":189},[184,967,902],{"class":218},[184,969,970],{"class":197}," role",[184,972,215],{"class":189},[184,974,975],{"class":218},"\"log\"",[184,977,905],{"class":197},[184,979,215],{"class":189},[184,981,982],{"class":218},"\"Messages\"",[184,984,913],{"class":189},[184,986,19],{"class":193},[184,988,989],{"class":189},">Oldest message\u003C\u002F",[184,991,19],{"class":193},[184,993,942],{"class":189},[184,995,954],{"class":193},[184,997,201],{"class":189},[184,999,1001,1003,1005,1007,1009,1012,1014,1016,1018,1020,1022,1025,1027,1029,1032,1034,1036,1038,1041,1043,1045,1047],{"class":122,"line":1000},60,[184,1002,883],{"class":189},[184,1004,954],{"class":193},[184,1006,889],{"class":197},[184,1008,215],{"class":189},[184,1010,1011],{"class":218},"\"carousel\"",[184,1013,897],{"class":197},[184,1015,215],{"class":189},[184,1017,902],{"class":218},[184,1019,905],{"class":197},[184,1021,215],{"class":189},[184,1023,1024],{"class":218},"\"Photos, scroll horizontally\"",[184,1026,913],{"class":189},[184,1028,954],{"class":193},[184,1030,1031],{"class":189},">One\u003C\u002F",[184,1033,954],{"class":193},[184,1035,913],{"class":189},[184,1037,954],{"class":193},[184,1039,1040],{"class":189},">Two\u003C\u002F",[184,1042,954],{"class":193},[184,1044,942],{"class":189},[184,1046,954],{"class":193},[184,1048,201],{"class":189},[184,1050,1052,1054,1056,1058,1060,1063,1066,1068,1071],{"class":122,"line":1051},61,[184,1053,883],{"class":189},[184,1055,710],{"class":193},[184,1057,889],{"class":197},[184,1059,215],{"class":189},[184,1061,1062],{"class":218},"\"modal\"",[184,1064,1065],{"class":197}," aria-labelledby",[184,1067,215],{"class":189},[184,1069,1070],{"class":218},"\"m-title\"",[184,1072,201],{"class":189},[184,1074,1076,1079,1081,1084,1086,1088,1091,1093],{"class":122,"line":1075},62,[184,1077,1078],{"class":189},"    \u003C",[184,1080,37],{"class":193},[184,1082,1083],{"class":197}," id",[184,1085,215],{"class":189},[184,1087,1070],{"class":218},[184,1089,1090],{"class":189},">Terms\u003C\u002F",[184,1092,37],{"class":193},[184,1094,201],{"class":189},[184,1096,1098,1100,1102,1104,1106,1109,1111,1113,1115,1118,1120],{"class":122,"line":1097},63,[184,1099,1078],{"class":189},[184,1101,954],{"class":193},[184,1103,889],{"class":197},[184,1105,215],{"class":189},[184,1107,1108],{"class":218},"\"modal__body\"",[184,1110,897],{"class":197},[184,1112,215],{"class":189},[184,1114,902],{"class":218},[184,1116,1117],{"class":189},">Long terms text…\u003C\u002F",[184,1119,954],{"class":193},[184,1121,201],{"class":189},[184,1123,1125,1128,1130],{"class":122,"line":1124},64,[184,1126,1127],{"class":189},"  \u003C\u002F",[184,1129,710],{"class":193},[184,1131,201],{"class":189},[184,1133,1135,1137,1139],{"class":122,"line":1134},65,[184,1136,854],{"class":189},[184,1138,875],{"class":193},[184,1140,201],{"class":189},[184,1142,1144,1146,1148],{"class":122,"line":1143},66,[184,1145,854],{"class":189},[184,1147,179],{"class":193},[184,1149,201],{"class":189},[19,1151,1152,1153,1155,1156,1158,1159,1162,1163,1166,1167,1170,1171,1174,1175,1182],{},"The modal lock deserves a note. ",[14,1154,16],{}," on the dialog body prevents chaining from gestures that ",[45,1157,628],{}," inside the dialog, but a wheel over the backdrop starts on the page and scrolls it directly. Locking the root with ",[14,1160,1161],{},"overflow: hidden"," covers that case, and ",[14,1164,1165],{},"scrollbar-gutter: stable"," prevents the layout shift that occurs when the root scrollbar disappears. Using ",[14,1168,1169],{},":root:has(dialog[open])"," keeps the lock in sync with the dialog state with no script — a stable-argument ",[14,1172,1173],{},":has()"," of the kind ",[26,1176,1178,1181],{"href":1177},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fhas-selector-performance\u002F",[1179,1180],"has",{},"() Selector Performance"," shows to be cheap even at the root.",[37,1184,1186,1187,342,1189,1191,1192],{"id":1185},"the-key-technique-auto-contain-and-none","The key technique: ",[14,1188,399],{},[14,1190,412],{}," and ",[14,1193,109],{},[50,1195,57,1198,57,1201,57,1204,57,1207,57,1214,57,1220,57,1223,57,1227,57,1229,57,1232,57,1237,57,1240,57,1242,57,1244,57,1247,57,1250,57,1252,57,1255,57,1257,57,1259,57,1261,57,1264],{"viewBox":1196,"role":53,"ariaLabel":1197,"xmlns":55,"style":56},"0 0 720 280","Table of the three overscroll-behavior values and what each does to chaining, local effects and root gestures",[59,1199,1200],{},"What each value keeps and removes",[63,1202,1203],{},"auto chains to ancestors and keeps local effects. contain stops chaining but keeps local bounce or glow. none stops chaining and removes local effects, and on the root disables pull-to-refresh where the browser ties it to overscroll.",[67,1205,1206],{"textAnchor":69,"x":70,"y":71,"style":72},"Three values, three behaviours at the boundary",[75,1208],{"x":77,"y":1209,"width":1210,"height":1211,"rx":1212,"fill":82,"opacity":1213},"44","160","32","6","0.3",[67,1215,1219],{"textAnchor":69,"x":1216,"y":1217,"style":1218},"280","65","text-anchor:middle;fill:currentColor;font:600 12px sans-serif","chains upward",[75,1221],{"x":1222,"y":1209,"width":1210,"height":1211,"rx":1212,"fill":82,"opacity":1213},"370",[67,1224,1226],{"textAnchor":69,"x":1225,"y":1217,"style":1218},"450","local bounce",[75,1228],{"x":140,"y":1209,"width":1210,"height":1211,"rx":1212,"fill":82,"opacity":1213},[67,1230,1231],{"textAnchor":69,"x":149,"y":1217,"style":1218},"root gestures",[67,1233,399],{"textAnchor":628,"x":1234,"y":1235,"style":1236},"40","112","text-anchor:start;fill:currentColor;font:600 13px ui-monospace,monospace",[67,1238,1239],{"textAnchor":69,"x":1216,"y":1235,"style":92},"yes",[67,1241,1239],{"textAnchor":69,"x":1225,"y":1235,"style":92},[67,1243,1239],{"textAnchor":69,"x":149,"y":1235,"style":92},[67,1245,412],{"textAnchor":628,"x":1234,"y":1246,"style":1236},"162",[67,1248,1249],{"textAnchor":69,"x":1216,"y":1246,"style":1218},"no",[67,1251,1239],{"textAnchor":69,"x":1225,"y":1246,"style":92},[67,1253,1254],{"textAnchor":69,"x":149,"y":1246,"style":92},"not reached",[67,1256,109],{"textAnchor":628,"x":1234,"y":141,"style":1236},[67,1258,1249],{"textAnchor":69,"x":1216,"y":141,"style":1218},[67,1260,1249],{"textAnchor":69,"x":1225,"y":141,"style":1218},[67,1262,1263],{"textAnchor":69,"x":149,"y":141,"style":92},"off (on root)",[67,1265,1268],{"textAnchor":69,"x":70,"y":1266,"style":1267},"258","text-anchor:middle;fill:currentColor;font:12px sans-serif;opacity:0.75","contain is the right default for self-contained panels; none is for special surfaces.",[19,1270,1271,1273,1274,1276],{},[14,1272,412],{}," is the value to reach for almost every time. It stops the chain and keeps the platform's local boundary feedback, so users still feel the bounce that tells them they reached the end of the list. ",[14,1275,109],{}," removes that feedback too, which makes the edge feel dead; reserve it for surfaces where any boundary effect is wrong, such as a full-screen map or a canvas where dragging past the edge should do nothing at all.",[19,1278,1279,1280,342,1283,1286,1287,1191,1290,1293],{},"The property has axis-specific longhands — ",[14,1281,1282],{},"overscroll-behavior-x",[14,1284,1285],{},"-y",", and the logical ",[14,1288,1289],{},"-inline",[14,1291,1292],{},"-block"," — which matter more than they seem. A horizontal carousel should contain the horizontal axis, to stop back-swipe navigation, but not the vertical axis: a user who swipes vertically over the carousel is trying to scroll the page, and containing both axes would trap them.",[37,1295,1297],{"id":1296},"where-containment-is-wrong","Where containment is wrong",[19,1299,1300,1301,1304],{},"Containment is so often the fix that it is tempting to apply it to every scroll container. Resist that, because in-flow scroll regions inside a document usually ",[45,1302,1303],{},"should"," chain.",[19,1306,1307,1308,1311,1312,1315,1316,1319,1320,1322],{},"A wide table wrapped in ",[14,1309,1310],{},"overflow-x: auto",", a long code block, a scrolling embed inside an article — these are parts of a page the reader is scrolling through. When the reader's wheel happens to pass over one while it is already at its end, chaining lets the page keep moving and the reading flow continues. Contain those regions and the wheel suddenly does nothing whenever the pointer lands on a code sample, which feels like the page has frozen. The guideline is: contain surfaces that are ",[45,1313,1314],{},"modal"," or ",[45,1317,1318],{},"self-contained"," — menus, dialogs, drawers, chat logs, maps, carousels — and leave inline regions of a document at ",[14,1321,399],{},".",[19,1324,1325,1326,1329],{},"There is one more case where the default matters: touch scrolling on long pages full of horizontally scrolling rows. With ",[14,1327,1328],{},"overscroll-behavior-x: contain"," on each row, a slightly diagonal vertical swipe that starts on a row still scrolls the page vertically, because only the horizontal axis is contained. Containing both axes on such rows would trap vertical swipes and make the page feel sticky. Axis-specific containment is what keeps these layouts comfortable on phones.",[37,1331,1333],{"id":1332},"variation-disabling-pull-to-refresh-for-a-specific-surface","Variation: disabling pull-to-refresh for a specific surface",[19,1335,1336,1337,1340],{},"Some full-screen surfaces genuinely conflict with pull-to-refresh: a map, a whiteboard, a game, a chat that scrolls to load older content at the top. Setting ",[14,1338,1339],{},"overscroll-behavior-y"," on the root disables the gesture where the browser implements it as an overscroll effect.",[175,1342,1346],{"className":1343,"code":1344,"language":1345,"meta":180,"style":180},"language-css shiki shiki-themes github-light-high-contrast github-dark-high-contrast","\u002F* Only on the full-screen map page, not site-wide. *\u002F\n:root:has(body.map-page) {\n  overscroll-behavior-y: none;\n}\n\n\u002F* The map itself should not bounce either. *\u002F\n.map {\n  position: fixed;\n  inset: 0;\n  overscroll-behavior: none;\n  touch-action: none;   \u002F* the map handles pan and zoom itself *\u002F\n}\n","css",[14,1347,1348,1353,1367,1378,1383,1387,1392,1399,1411,1422,1433,1447],{"__ignoreMap":180},[184,1349,1350],{"class":122,"line":186},[184,1351,1352],{"class":361},"\u002F* Only on the full-screen map page, not site-wide. *\u002F\n",[184,1354,1355,1358,1360,1362,1365],{"class":122,"line":204},[184,1356,1357],{"class":197},":root:has",[184,1359,707],{"class":189},[184,1361,875],{"class":193},[184,1363,1364],{"class":197},".map-page",[184,1366,725],{"class":189},[184,1368,1369,1372,1374,1376],{"class":122,"line":224},[184,1370,1371],{"class":197},"  overscroll-behavior-y",[184,1373,313],{"class":189},[184,1375,109],{"class":197},[184,1377,388],{"class":189},[184,1379,1380],{"class":122,"line":234},[184,1381,1382],{"class":189},"}\n",[184,1384,1385],{"class":122,"line":252},[184,1386,355],{"emptyLinePlaceholder":354},[184,1388,1389],{"class":122,"line":277},[184,1390,1391],{"class":361},"\u002F* The map itself should not bounce either. *\u002F\n",[184,1393,1394,1397],{"class":122,"line":291},[184,1395,1396],{"class":197},".map",[184,1398,371],{"class":189},[184,1400,1401,1404,1406,1409],{"class":122,"line":301},[184,1402,1403],{"class":197},"  position",[184,1405,313],{"class":189},[184,1407,1408],{"class":197},"fixed",[184,1410,388],{"class":189},[184,1412,1413,1416,1418,1420],{"class":122,"line":351},[184,1414,1415],{"class":197},"  inset",[184,1417,313],{"class":189},[184,1419,316],{"class":197},[184,1421,388],{"class":189},[184,1423,1424,1427,1429,1431],{"class":122,"line":358},[184,1425,1426],{"class":197},"  overscroll-behavior",[184,1428,313],{"class":189},[184,1430,109],{"class":197},[184,1432,388],{"class":189},[184,1434,1435,1438,1440,1442,1444],{"class":122,"line":365},[184,1436,1437],{"class":197},"  touch-action",[184,1439,313],{"class":189},[184,1441,109],{"class":197},[184,1443,415],{"class":189},[184,1445,1446],{"class":361},"\u002F* the map handles pan and zoom itself *\u002F\n",[184,1448,1449],{"class":122,"line":374},[184,1450,1382],{"class":189},[19,1452,1453,1454,1457],{},"Two cautions apply. First, scope it tightly — to one page type, or to a state such as an open editor — because users expect pull-to-refresh on ordinary content pages and removing it is a surprising regression. Second, ",[14,1455,1456],{},"touch-action: none"," hands every gesture to the page, so the map must implement its own panning and zooming, and browser pinch-zoom is disabled over it. That is appropriate for a map widget and inappropriate almost anywhere else, since pinch-zoom is an important accessibility tool.",[19,1459,1460,1461,1465,1466,1469,1470,1474],{},"Nested scrolling pairs naturally with the snapport properties covered in ",[26,1462,1464],{"href":1463},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fscroll-margin-and-scroll-padding-for-sticky-headers\u002F","scroll-margin and scroll-padding",", since a contained panel with a sticky internal header needs its own ",[14,1467,1468],{},"scroll-padding"," for focus scrolling inside it. And where a panel's content animates in as it scrolls, ",[26,1471,1473],{"href":1472},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-triggered-reveal-animations\u002F","scroll-driven animations"," can attach to the panel's own scroll timeline rather than the page's.",[37,1476,1478],{"id":1477},"browser-support","Browser support",[19,1480,1481,1483,1484,1486,1487,1490,1491,1493],{},[14,1482,16],{}," and its longhands are supported in all current versions of Chrome, Edge, Firefox and Safari. How ",[14,1485,109],{}," on the root interacts with pull-to-refresh and history-swipe gestures varies by platform, because those gestures are browser features rather than CSS features; test on the devices you support. ",[14,1488,1489],{},"scrollbar-gutter"," is supported in current Chromium and Firefox and in recent Safari. ",[14,1492,1173],{},", used for the scroll lock, is supported in Chrome and Edge 105+, Firefox 121+ and Safari 15.4+.",[37,1495,1497],{"id":1496},"faq","FAQ",[19,1499,1500,1504],{},[1501,1502,1503],"strong",{},"What is scroll chaining?","\nWhen an inner scroll container reaches its end and the user keeps scrolling, the browser passes the remaining scroll to the nearest scrollable ancestor, usually the page. That hand-off is scroll chaining, and it is why scrolling to the bottom of a dropdown can suddenly move the whole page.",[19,1506,1507,1515,1516,1518,1519,1521],{},[1501,1508,1509,1510,1191,1512,1514],{},"What is the difference between ",[14,1511,412],{},[14,1513,109],{},"?","\nBoth stop scroll chaining to ancestors. ",[14,1517,412],{}," keeps the element's own boundary effects, such as the bounce or glow at the edge. ",[14,1520,109],{}," also removes those local effects, and on the root element it disables pull-to-refresh and edge-swipe navigation where the browser ties them to overscroll.",[19,1523,1524,1530,1531,1533,1534,1536],{},[1501,1525,1526,1527,1529],{},"Does ",[14,1528,16],{}," lock the page behind a modal?","\nOnly partly. It stops scrolling that starts inside the modal from chaining to the page, but the page can still be scrolled directly, for example by a wheel over the backdrop. Combine it with ",[14,1532,1161],{}," on the root while the modal is open, which ",[14,1535,1173],{}," can apply without script.",[19,1538,1539,1542],{},[1501,1540,1541],{},"Is it safe to disable pull-to-refresh?","\nOnly for surfaces where the gesture misfires, such as a full-screen map, a drawing canvas or a chat that scrolls upward. Users rely on pull-to-refresh on ordinary pages, so never disable it globally just to remove the bounce effect.",[37,1544,1546],{"id":1545},"related","Related",[886,1548,1549,1554,1561,1568],{},[916,1550,1551,1553],{},[26,1552,29],{"href":28}," — the parent guide to scrolling layouts.",[916,1555,1556,1560],{},[26,1557,1559],{"href":1558},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fcss-only-carousel-with-scroll-snap\u002F","CSS-Only Carousel With Scroll Snap"," — a contained horizontal scroller in full.",[916,1562,1563,1567],{},[26,1564,1566],{"href":1565},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-attribute-and-css-styling\u002F","Popover Attribute and CSS Styling"," — overlays whose inner lists need containment.",[916,1569,1570,1574],{},[26,1571,1573],{"href":1572},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransitioning-display-with-allow-discrete\u002F","Transitioning display With allow-discrete"," — animating the modals these rules lock behind.",[296,1576,1577],{},"html pre.shiki code .suds8, html code.shiki .suds8{--shiki-default:#0E1116;--shiki-dark:#F0F3F6}html pre.shiki code .sne4z, html code.shiki .sne4z{--shiki-default:#024C1A;--shiki-dark:#72F088}html pre.shiki code .s-5SL, html code.shiki .s-5SL{--shiki-default:#023B95;--shiki-dark:#91CBFF}html pre.shiki code .sT6z2, html code.shiki .sT6z2{--shiki-default:#032563;--shiki-dark:#ADDCFF}html pre.shiki code .sHUrx, html code.shiki .sHUrx{--shiki-default:#A0111F;--shiki-dark:#FF9492}html pre.shiki code .sLBg1, html code.shiki .sLBg1{--shiki-default:#66707B;--shiki-dark:#BDC4CC}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":180,"searchDepth":204,"depth":204,"links":1579},[1580,1581,1582,1584,1585,1586,1587,1588],{"id":39,"depth":204,"text":40},{"id":158,"depth":204,"text":159},{"id":1185,"depth":204,"text":1583},"The key technique: auto, contain and none",{"id":1296,"depth":204,"text":1297},{"id":1332,"depth":204,"text":1333},{"id":1477,"depth":204,"text":1478},{"id":1496,"depth":204,"text":1497},{"id":1545,"depth":204,"text":1546},"Stop scroll chaining from inner panels, modals and carousels to the page, disable pull-to-refresh and back-swipe where they misfire, and lock background scroll.","md",{"pageTitle":1592,"datePublished":1593,"dateModified":1593,"faq":1594},"overscroll-behavior for Nested Scrolling","2026-09-18",[1595,1597,1600,1603],{"q":1503,"a":1596},"When an inner scroll container reaches its end and the user keeps scrolling, the browser passes the remaining scroll to the nearest scrollable ancestor, usually the page. That hand-off is scroll chaining, and it is why scrolling to the bottom of a dropdown can suddenly move the whole page.",{"q":1598,"a":1599},"What is the difference between contain and none?","Both stop scroll chaining to ancestors. contain keeps the element's own boundary effects, such as the bounce or glow at the edge. none also removes those local effects, and on the root element it disables pull-to-refresh and edge-swipe navigation where the browser ties them to overscroll.",{"q":1601,"a":1602},"Does overscroll-behavior lock the page behind a modal?","Only partly. It stops scrolling that starts inside the modal from chaining to the page, but the page can still be scrolled directly, for example by a wheel over the backdrop. Combine it with overflow: hidden on the root while the modal is open, which :has() can apply without script.",{"q":1541,"a":1604},"Only for surfaces where the gesture misfires, such as a full-screen map, a drawing canvas or a chat that scrolls upward. Users rely on pull-to-refresh on ordinary pages, so never disable it globally just to remove the bounce effect.","\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Foverscroll-behavior-for-nested-scrolling",{"title":5,"description":1589},"mastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Foverscroll-behavior-for-nested-scrolling\u002Findex","tmZQSm9mA3ol3pAoyZOieUbfFLyq_RKs3k8HZMxb_3s",[1610,1613,1616,1619,1622,1625,1628,1631,1634,1637,1640,1643,1646,1649,1652,1655,1658,1661,1664,1667,1670,1673,1676,1679,1682,1685,1688,1691,1694,1697,1700,1703,1706,1709,1712,1715,1718,1721,1724,1727,1730,1733,1736,1739,1742,1745,1748,1751,1754,1757,1760,1763,1766,1769,1772,1775,1778,1781,1784,1787,1790,1793,1796,1799,1802,1805,1808,1811,1814,1817,1820,1823,1826,1829,1832,1835,1838,1841,1844,1847,1850,1853,1856,1859,1862,1865,1868,1871,1874,1877,1880,1883,1886,1889,1891,1894,1897,1900,1903,1906,1909,1912,1915,1918,1921,1924,1927,1930,1933,1936,1939,1942,1945,1948,1951,1954,1957,1960,1963,1966,1969,1972,1975,1978,1981,1984,1987,1990,1993,1996,1999,2002,2005,2008,2011,2014,2017,2020,2023,2026,2029,2031,2034,2037,2040,2043,2046,2049,2052,2055,2058,2061,2064,2067,2070,2073,2076,2079,2082,2085,2088,2091,2094,2097,2100,2103,2106,2109,2112,2115,2118,2121,2124,2127,2128,2131,2134,2137,2140,2143,2146,2149,2152,2155,2158,2161,2164],{"path":1611,"title":1612},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fcreating-accessible-focus-indicators","Creating Accessible Focus Indicators: Building a Ring That Survives Any Background",{"path":1614,"title":1615},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fflashing-content-and-seizure-thresholds","Flashing Content and Seizure Thresholds",{"path":1617,"title":1618},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fforced-colors-mode-and-animations","Forced Colors Mode and Animations",{"path":1620,"title":1621},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations","Accessibility in CSS Animations: Patterns, Specs & Best Practices",{"path":1623,"title":1624},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fpause-controls-for-looping-animations","Pause Controls for Looping CSS Animations: Meeting WCAG 2.2.2",{"path":1626,"title":1627},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fprefers-reduced-motion-recipes","prefers-reduced-motion Recipes: A Reduction for Every Common Effect",{"path":1629,"title":1630},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Freducing-motion-preferences-in-css","Reducing Motion Preferences in CSS: How the Setting Becomes a Media Feature",{"path":1632,"title":1633},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Ftarget-size-and-pointer-accessibility","Target Size and Pointer Accessibility: Meeting 2.5.8 Without Redesigning",{"path":1635,"title":1636},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fvestibular-safe-animation-patterns","Vestibular-Safe Animation Patterns: Why Some Motion Makes People Sick",{"path":1638,"title":1639},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fwcag-motion-success-criteria","WCAG Motion Success Criteria: What Each One Actually Requires",{"path":1641,"title":1642},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fanimated-gradient-borders-with-property","Animated Gradient Borders With @property: A Spinning Highlight Without Extra Elements",{"path":1644,"title":1645},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fclip-path-reveal-animations","Clip-Path Reveal Animations: Wipes, Irises and Corners Without Extra Markup",{"path":1647,"title":1648},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations","Clip-Path & Mask Animations: Animating Visibility Instead of Position",{"path":1650,"title":1651},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fmask-image-fade-edges","Fading Edges With mask-image: Soft Boundaries That Work on Any Background",{"path":1653,"title":1654},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fmorphing-shapes-with-clip-path-polygon","Morphing Shapes With clip-path: polygon(): Point-Matched Transitions",{"path":1656,"title":1657},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fanimating-gradients","Animating CSS Gradients: Smooth Colour Motion Without Jumps",{"path":1659,"title":1660},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fcolor-mix-hover-states","Hover and Active States With color-mix(): One Token, Every Shade",{"path":1662,"title":1663},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions","Color & Theme Transitions: Colour as Part of the Motion System",{"path":1665,"title":1666},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Flight-dark-function-for-themes","Light and Dark Themes With light-dark(): One Declaration per Colour",{"path":1668,"title":1669},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fsmooth-theme-switching-transitions","Smooth Theme Switching: Crossfades, Circular Reveals and No Flash",{"path":1671,"title":1672},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fcontainer-query-hover-affordances","Container Query Hover Affordances: When Narrow Means Persistent, Not Hidden",{"path":1674,"title":1675},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion","Container-Aware Motion: Animation Sized by the Space a Component Actually Has",{"path":1677,"title":1678},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Flayout-change-animations-at-container-breakpoints","Animating Changes at Container Breakpoints",{"path":1680,"title":1681},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fmotion-driven-by-container-style-queries","Motion Driven by Container Style Queries",{"path":1683,"title":1684},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fmotion-that-scales-with-container-size","Motion That Scales with Container Size: cqi, cqb, and Derived Durations",{"path":1686,"title":1687},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fsuppressing-motion-in-small-containers","Suppressing Motion in Small Containers: Deliberately Animating Nothing",{"path":1689,"title":1690},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fcontrolling-css-animations-from-javascript","Controlling CSS Animations From JavaScript",{"path":1692,"title":1693},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api","CSS Animation vs the Web Animations API: A Decision Guide",{"path":1695,"title":1696},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fwaapi-vs-css-for-interruptible-ui","Interruptible UI: CSS Transitions vs WAAPI",{"path":1698,"title":1699},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fwhen-to-use-javascript-animation","When to Use JavaScript Instead of CSS for Animation",{"path":1701,"title":1702},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fanimating-custom-properties-with-at-property","Animating Custom Properties with @property: Typed Variables That Interpolate",{"path":1704,"title":1705},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fcustom-property-fallbacks-and-invalid-values","Custom Property Fallbacks and Invalid Values",{"path":1707,"title":1708},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Ffluid-spacing-tokens-driving-transition-durations","Fluid Spacing Tokens That Drive Transition Durations",{"path":1710,"title":1711},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture","CSS Custom Properties Architecture: Scalable Design Systems & Dynamic UI",{"path":1713,"title":1714},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fregistered-properties-and-type-safety","Registered Properties and Type Safety: @property as a Contract for Design Tokens",{"path":1716,"title":1717},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fscoping-custom-properties-to-components","Scoping Custom Properties to Components",{"path":1719,"title":1720},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fcss-transition-timing-functions","CSS Transition Timing Functions: ease, cubic-bezier(), steps() and linear()",{"path":1722,"title":1723},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals","CSS Transition Fundamentals: Architecture, Performance & Patterns",{"path":1725,"title":1726},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Finterrupted-and-reversing-transitions","Interrupted and Reversing Transitions: What Happens Mid-Flight",{"path":1728,"title":1729},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fstarting-style-entry-animations","@starting-style: Animating an Element's Very First Style Change",{"path":1731,"title":1732},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-delay-choreography","Choreographing Motion With transition-delay",{"path":1734,"title":1735},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-shorthand-and-multiple-properties","The transition Shorthand and Multiple Properties",{"path":1737,"title":1738},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransitioning-display-with-allow-discrete","Transitioning display with transition-behavior: allow-discrete and @starting-style",{"path":1740,"title":1741},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fanimating-dialog-open-and-close","Animating \u003Cdialog> Open and Close: Both Directions, No Library",{"path":1743,"title":1744},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fbackdrop-animations","Animating ::backdrop: Fades and Blurs Behind Dialogs and Popovers",{"path":1746,"title":1747},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations","Dialog & Popover Animations: Motion for the Top Layer",{"path":1749,"title":1750},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Finterpolate-size-for-height-auto-animation","Animating to height: auto With interpolate-size and calc-size()",{"path":1752,"title":1753},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fpopover-entry-and-exit-transitions","Popover Menus That Animate From Their Anchor",{"path":1755,"title":1756},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fchoosing-animation-durations","Choosing Animation Durations: How Long Motion Should Last",{"path":1758,"title":1759},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fcubic-bezier-overshoot-and-anticipation","Overshoot and Anticipation With cubic-bezier(): Motion With Character",{"path":1761,"title":1762},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fentry-vs-exit-easing","Entry vs Exit Easing: Different Curves for Arriving and Leaving",{"path":1764,"title":1765},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design","Easing & Motion Design: Making CSS Motion Feel Intentional",{"path":1767,"title":1768},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Flinear-easing-function-for-springs","Spring and Bounce Easing With linear(): Physical Motion Without JavaScript",{"path":1770,"title":1771},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fsteps-easing-for-sprite-animations","steps() Easing: Sprite Sheets, Typewriters and Other Frame-by-Frame Effects",{"path":1773,"title":1774},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Faccessible-css-only-tooltips","Accessible CSS-Only Tooltips and Hover Cards With  and ",{"path":1776,"title":1777},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fbutton-press-and-active-states","Button Press and  States",{"path":1779,"title":1780},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Ffocus-visible-vs-focus-polyfill-alternatives"," vs :focus: Why It Replaced the Focus-Ring Polyfill",{"path":1782,"title":1783},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Ffocus-within-form-patterns"," Form Patterns: Styling a Group From the Field Inside It",{"path":1785,"title":1786},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fhover-intent-delays-with-transition-delay","Hover Intent Delays With transition-delay: Menus That Don't Flicker",{"path":1788,"title":1789},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design","Hover & Focus State Design: Spec-Compliant Patterns for Modern UIs",{"path":1791,"title":1792},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fpointer-and-hover-media-queries","Pointer and Hover Media Queries: Gating Affordances by Input Capability",{"path":1794,"title":1795},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fsmooth-hover-effects-without-javascript","Smooth Hover Effects Without JavaScript: CSS-Only Patterns for Modern UI",{"path":1797,"title":1798},"\u002Fcss-only-micro-interactions-animations","CSS-Only Micro-Interactions & Animations: Architecture, Performance & Implementation",{"path":1800,"title":1801},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fanimation-composition-and-stacking","Stacking Animations With animation-composition",{"path":1803,"title":1804},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fanimation-fill-mode-explained","animation-fill-mode: What an Animation Applies Before and After It Runs",{"path":1806,"title":1807},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcontainer-query-triggered-keyframe-animations","Container-Query-Triggered Keyframe Animations: Animate Differently per Available Space",{"path":1809,"title":1810},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-accordions-and-disclosure","CSS-Only Accordions and Disclosure Widgets with details and summary",{"path":1812,"title":1813},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-loading-spinners-and-skeletons","CSS-Only Loading Spinners and Skeleton Shimmer Screens with @keyframes",{"path":1815,"title":1816},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-toggle-switches-and-checkboxes","CSS-Only Toggle Switches and Checkboxes That Keep the Native Input",{"path":1818,"title":1819},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns","Keyframe Animation Patterns: Spec-Compliant Architectures for Modern UIs",{"path":1821,"title":1822},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fmulti-step-keyframes-and-per-keyframe-easing","Multi-Step Keyframes and Per-Keyframe Easing",{"path":1824,"title":1825},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fstaggered-list-animations-with-custom-properties","Staggered List Animations Using --i Index Custom Properties",{"path":1827,"title":1828},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fanimating-box-shadow-and-filters-cheaply","Animating box-shadow and Filters Cheaply",{"path":1830,"title":1831},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcontain-property-for-animation-performance","The contain Property for Animation Performance",{"path":1833,"title":1834},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcss-triggers-layout-paint-composite","Layout, Paint and Composite: What Triggers What",{"path":1836,"title":1837},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration","Performance & GPU Acceleration in CSS: A Developer’s Blueprint",{"path":1839,"title":1840},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Foptimizing-css-animations-for-60fps","Optimizing CSS Animations for 60fps: Budgeting the Frame",{"path":1842,"title":1843},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fprofiling-animations-in-devtools","Profiling CSS Animations in DevTools: Finding the Frame That Costs Too Much",{"path":1845,"title":1846},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fwill-change-and-the-compositor-thread","will-change and the Compositor Thread: Layer Promotion Without the Footguns",{"path":1848,"title":1849},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations","Scroll-Driven Animations: Binding Motion to Scroll Position in Pure CSS",{"path":1851,"title":1852},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-animation-fallbacks","Shipping Scroll-Driven Animations Without Breaking Anything",{"path":1854,"title":1855},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-parallax-effects","Scroll-Driven Parallax Effects in CSS",{"path":1857,"title":1858},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-progress-bar-without-javascript","A Reading Progress Bar Driven by scroll(root)",{"path":1860,"title":1861},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-triggered-reveal-animations","Reveal-on-Scroll with view() and animation-range",{"path":1863,"title":1864},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Ftimeline-scope-for-cross-element-animations","timeline-scope for Cross-Element Animations",{"path":1866,"title":1867},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fview-timeline-and-animation-range","View Timelines and animation-range",{"path":1869,"title":1870},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fcross-document-view-transitions","Cross-Document View Transitions",{"path":1872,"title":1873},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers","View Transitions for CSS Developers: the Pseudo-Element Tree, Snapshots, and Named Elements",{"path":1875,"title":1876},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fsame-document-view-transitions","Writing a Same-Document View Transition: the CSS You Actually Author",{"path":1878,"title":1879},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transition-names-shared-elements","view-transition-name and Shared Elements: Morphing a Thumbnail into a Hero",{"path":1881,"title":1882},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transition-types-and-classes","View Transition Types and Classes",{"path":1884,"title":1885},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-for-list-reordering","View Transitions for List Reordering",{"path":1887,"title":1888},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-with-reduced-motion","Honouring prefers-reduced-motion in View Transitions",{"path":334,"title":1890},"Modern CSS Layouts & Micro-Interactions",{"path":1892,"title":1893},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioned-tooltips","Anchor-Positioned Tooltips: Tethering, Flipping, and Getting the Semantics Right",{"path":1895,"title":1896},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioning-fallbacks","Anchor Positioning Fallbacks: A Graceful Floor for Older Browser Versions",{"path":1898,"title":1899},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-size-for-matching-widths","anchor-size(): Overlays That Match Their Trigger's Size",{"path":1901,"title":1902},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays","CSS Anchor Positioning and Overlays: Tethering Elements Without JavaScript",{"path":1904,"title":1905},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-attribute-and-css-styling","The popover Attribute: Top-Layer Overlays With No JavaScript",{"path":1907,"title":1908},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-light-dismiss-and-stacking","Popover Light Dismiss, Nesting and Stacking",{"path":1910,"title":1911},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fposition-area-grid-explained","position-area: The Anchor Placement Grid",{"path":1913,"title":1914},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fcontainer-query-polyfill-tradeoffs","Container Query Polyfills: What They Cost and When to Skip Them",{"path":1916,"title":1917},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ffeature-detection-with-supports","Feature Detection with @supports: Syntax, Semantics, and the Traps",{"path":1919,"title":1920},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fhandling-container-query-fallbacks-for-older-browsers","Handling Container Query Fallbacks for Older Browsers",{"path":1922,"title":1923},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks","Container Query Fallbacks: Spec-Compliant CSS Strategies for Legacy Browsers",{"path":1925,"title":1926},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fintrinsic-layout-fallbacks-without-queries","Intrinsic Layout Fallbacks: Baselines That Adapt Without Any Query",{"path":1928,"title":1929},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ftesting-fallbacks-without-old-browsers","Testing CSS Fallbacks Without an Old Browser",{"path":1931,"title":1932},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-queries-inside-css-nesting","Container Queries Inside CSS Nesting: Keeping Responses Next to the Styles They Change",{"path":1934,"title":1935},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-query-range-and-logic-operators","Container Query Range Syntax and Logic Operators",{"path":1937,"title":1938},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-query-units-cqi-cqb-explained","Container Query Units Explained: cqi, cqb, cqw, cqh, cqmin and cqmax",{"path":1940,"title":1941},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-type-size-vs-inline-size","Choosing container-type: inline-size, size, or normal",{"path":1943,"title":1944},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-vs-media-queries-comparison","Container vs Media Queries: Choosing the Right Reference Box",{"path":1946,"title":1947},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fdebugging-container-queries-in-devtools","Debugging Container Queries in DevTools: Why a Rule Doesn't Match",{"path":1949,"title":1950},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fhow-to-use-container-queries-in-production","How to Use Container Queries in Production Without a Rewrite",{"path":1952,"title":1953},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics","Container Query Syntax Basics",{"path":1955,"title":1956},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fnesting-and-naming-container-queries","Nesting and Naming Container Queries: Targeting the Right Ancestor",{"path":1958,"title":1959},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fauto-fit-minmax-responsive-grids","Responsive Grids with repeat(auto-fit, minmax())",{"path":1961,"title":1962},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fbuilding-a-dashboard-with-subgrid","Building a Responsive Dashboard Where Cards Align with Subgrid",{"path":1964,"title":1965},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fgrid-auto-flow-dense-packing","grid-auto-flow: dense for Packed Layouts",{"path":1967,"title":1968},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fgrid-template-areas-responsive-layouts","Responsive Layouts With grid-template-areas: Rearranging Regions by Name",{"path":1970,"title":1971},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fholy-grail-layout-with-grid","The Holy-Grail Layout with CSS Grid and Container Queries",{"path":1973,"title":1974},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts","CSS Grid and Subgrid Layouts for Responsive Interfaces",{"path":1976,"title":1977},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fmasonry-style-layouts-with-grid","Masonry-Style Layouts With the CSS That Ships Today",{"path":1979,"title":1980},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Foverlapping-elements-with-grid-stacking","Overlapping Elements With Grid Stacking: Layers Without position: absolute",{"path":1982,"title":1983},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fsubgrid-vs-nested-grid","Subgrid vs an Independently Nested Grid",{"path":1985,"title":1986},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fcentering-in-css-every-method","Centering in CSS: Every Modern Method and When Each One Breaks",{"path":1988,"title":1989},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-basis-vs-width","flex-basis vs width: Which Size a Flex Item Actually Starts From",{"path":1991,"title":1992},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-grow-and-flex-shrink-explained","flex-grow and flex-shrink Explained",{"path":1994,"title":1995},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-wrap-intrinsic-responsive-rows","Breakpoint-Free Responsive Rows With flex-wrap and flex-basis",{"path":1997,"title":1998},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflexbox-gap-and-spacing","Flexbox gap vs Margins: Spacing Items Without Edge Hacks",{"path":2000,"title":2001},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns","Flexbox Layout Patterns: One-Dimensional Layout for Real Components",{"path":2003,"title":2004},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fsticky-footer-with-flexbox-and-grid","Sticky Footer With Flexbox or Grid: Pinning the Footer on Short Pages",{"path":2006,"title":2007},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fclamp-vs-media-query-typography","clamp() Fluid Type vs Media-Query Step Typography: Tradeoffs and Anatomy",{"path":2009,"title":2010},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fdebugging-clamp-values","Debugging clamp(): Values That Are Ignored, Stuck or Never Fluid",{"path":2012,"title":2013},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-line-height-and-measure","Fluid Line Height and Measure: Keeping Text Readable as It Scales",{"path":2015,"title":2016},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-space-scale-with-clamp","Building a Fluid Spacing Scale with clamp() and Container Units",{"path":2018,"title":2019},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-type-accessibility-and-zoom","Fluid Type, Accessibility and Zoom: The vw-Only Trap",{"path":2021,"title":2022},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-typography-without-javascript","Fluid Typography Without JavaScript: A Precision CSS Reference",{"path":2024,"title":2025},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp","Fluid Typography with clamp(): A Practical Guide for Modern CSS",{"path":2027,"title":2028},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ftext-wrap-balance-and-pretty","text-wrap: balance and pretty: Better Line Breaks Without Manual Breaks",{"path":2030,"title":34},"\u002Fmastering-container-queries-responsive-layouts",{"path":2032,"title":2033},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Faspect-ratio-for-responsive-media","Using aspect-ratio for Responsive Media and Preventing Layout Shift",{"path":2035,"title":2036},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fcontent-visibility-and-contain-intrinsic-size","content-visibility and contain-intrinsic-size: Rendering Only What Is Near the Screen",{"path":2038,"title":2039},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques","Intrinsic Sizing Techniques: Modern CSS Layouts for Responsive UI",{"path":2041,"title":2042},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Flayout-widths-with-min-max-clamp","Layout Widths With min(), max() and clamp(): Sizing Without Breakpoints",{"path":2044,"title":2045},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fmin-max-fit-content-explained","min-content, max-content, and fit-content() Explained",{"path":2047,"title":2048},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fobject-fit-and-object-position","object-fit and object-position: Images That Fit Any Box",{"path":2050,"title":2051},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fpreventing-flex-and-grid-overflow","The min-width: auto Trap in Flex and Grid Layouts",{"path":2053,"title":2054},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-for-reset-and-tokens","Cascade Layers for Reset and Design Tokens",{"path":2056,"title":2057},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-vs-specificity-hacks","Cascade Layers vs Specificity Hacks: Ordering Instead of Escalating",{"path":2059,"title":2060},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcss-scope-for-component-styles","@scope for Component Styles: Short Selectors That Cannot Leak",{"path":2062,"title":2063},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies","Modern CSS Reset Strategies: A Spec-Compliant Foundation",{"path":2065,"title":2066},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Frevert-layer-and-revert-keywords","initial, inherit, unset, revert and revert-layer: Undoing Styles Correctly",{"path":2068,"title":2069},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fwriting-a-minimal-modern-reset","Writing a Minimal Modern CSS Reset: Every Line Justified",{"path":2071,"title":2072},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fcontent-aware-card-layouts-with-has","Content-Aware Card Layouts With :has(): One Component, Many Shapes",{"path":2074,"title":2075},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fempty-and-loading-states-with-has","Empty and Loading States With ()",{"path":2077,"title":2078},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fform-validation-layouts-with-has","Form Validation Layouts With :has(): Styling Groups From Field State",{"path":2080,"title":2081},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fhas-selector-performance",":has() Selector Performance: What Is Cheap, What Is Not, and How to Measure",{"path":2083,"title":2084},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fhas-vs-container-style-queries",":has() vs Container Style Queries: Discovered State and Published State",{"path":2086,"title":2087},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has","Parent-Aware Layouts With :has(): Letting Containers React to Their Contents",{"path":2089,"title":2090},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fquantity-queries-with-has","Quantity Queries With :has(): Layouts That Respond to How Many Items There Are",{"path":2092,"title":2093},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fbuilding-responsive-cards-with-container-queries","Building Responsive Cards with Container Queries: A Production-Ready Guide",{"path":2095,"title":2096},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-data-tables","Container Query Data Tables: Reflowing Tables to Cards",{"path":2098,"title":2099},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-sidebar-layouts","Container Query Sidebar Layouts That Travel Between Contexts",{"path":2101,"title":2102},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns","Responsive Component Patterns: Architecture & Implementation",{"path":2104,"title":2105},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-forms-with-container-queries","Responsive Forms with Container Queries: Reflow Without Losing the Wiring",{"path":2107,"title":2108},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-hero-sections-with-container-queries","Responsive Hero Sections With Container Queries",{"path":2110,"title":2111},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-navigation-without-media-queries","Responsive Navigation Without Media Queries Using Container Queries",{"path":2113,"title":2114},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-pricing-tables","Responsive Pricing Tables: Aligned Features, a Clear Recommendation, Any Width",{"path":2116,"title":2117},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Ftabs-that-become-accordions","Tabs That Become an Accordion: One Component, Two Layouts",{"path":2119,"title":2120},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fcss-only-carousel-with-scroll-snap","A CSS-Only Carousel With Scroll Snap",{"path":2122,"title":2123},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fhorizontal-scrolling-card-rows","Horizontal Scrolling Card Rows: Swipeable Lists That Stay in Their Lane",{"path":2125,"title":2126},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts","Scroll Snap & Overflow Layouts: Designing Components That Scroll on Purpose",{"path":1605,"title":5},{"path":2129,"title":2130},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fscroll-margin-and-scroll-padding-for-sticky-headers","scroll-margin and scroll-padding: Keeping Targets Clear of Sticky Headers",{"path":2132,"title":2133},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fcombining-size-and-style-queries","Combining Size and Style Container Queries",{"path":2135,"title":2136},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fcontainer-style-query-theming","Container Style Query Theming: One Token Instead of a Variant Class Matrix",{"path":2138,"title":2139},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state","Style Queries and Container State: Token-Driven Component Variants",{"path":2141,"title":2142},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fstyle-queries-with-custom-properties","Style Queries With Custom Properties: Declaring, Inheriting, and Matching Tokens",{"path":2144,"title":2145},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fstyle-query-component-variants","Component Variants With Style Queries: One Token, Many Looks",{"path":2147,"title":2148},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fstyle-query-fallbacks-and-support","Style Query Fallbacks and Support: Designing for Older Browser Versions",{"path":2150,"title":2151},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Fdvh-svh-lvh-mobile-viewport-units","dvh, svh and lvh: Choosing the Right Mobile Viewport Unit",{"path":2153,"title":2154},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Ffull-bleed-sections-in-constrained-layouts","Full-Bleed Sections in a Constrained Layout: Breaking Out Without Breaking the Page",{"path":2156,"title":2157},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout","Viewport Units & Mobile Layout: Designing for the Screen You Actually Get",{"path":2159,"title":2160},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Fsafe-area-insets-for-notched-screens","Safe Area Insets: Designing Around Notches, Corners and Home Indicators",{"path":2162,"title":2163},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Fviewport-units-vs-container-units","Viewport Units vs Container Units: Choosing the Right Reference Box",{"path":2165,"title":2166},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Fvirtual-keyboard-and-interactive-widget","Layouts That Survive the Virtual Keyboard",{"title":2168,"caption":2169,"height":2170,"html":2171,"css":2172},"Scroll chaining with and without overscroll-behavior: contain","Scroll each list to its end and keep going: the left list hands the scroll to the outer panel, the right list stops at its edge.",300,"\n\u003Cdiv class=\"outer\">\n  \u003Cp class=\"note\">Outer panel — scroll inside a list below.\u003C\u002Fp>\n  \u003Cdiv class=\"pair\">\n    \u003Cul class=\"list\" tabindex=\"0\" aria-label=\"List without containment\">\u003Cli>auto 1\u003C\u002Fli>\u003Cli>auto 2\u003C\u002Fli>\u003Cli>auto 3\u003C\u002Fli>\u003Cli>auto 4\u003C\u002Fli>\u003Cli>auto 5\u003C\u002Fli>\u003Cli>auto 6\u003C\u002Fli>\u003Cli>auto 7\u003C\u002Fli>\u003Cli>auto 8\u003C\u002Fli>\u003C\u002Ful>\n    \u003Cul class=\"list contained\" tabindex=\"0\" aria-label=\"List with containment\">\u003Cli>contain 1\u003C\u002Fli>\u003Cli>contain 2\u003C\u002Fli>\u003Cli>contain 3\u003C\u002Fli>\u003Cli>contain 4\u003C\u002Fli>\u003Cli>contain 5\u003C\u002Fli>\u003Cli>contain 6\u003C\u002Fli>\u003Cli>contain 7\u003C\u002Fli>\u003Cli>contain 8\u003C\u002Fli>\u003C\u002Ful>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"filler\">More outer content\u003C\u002Fdiv>\n\u003C\u002Fdiv>","\nbody { display: block; }\n.outer { height: 250px; overflow-y: auto; border: 1px solid var(--demo-border); border-radius: 8px; padding: 0.75rem; }\n.note { margin: 0 0 0.5rem; color: var(--demo-muted); font-size: 0.85rem; }\n.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }\n.list { max-height: 7rem; overflow-y: auto; margin: 0; padding: 0.25rem 0.75rem; border: 1px solid var(--demo-border); border-radius: 6px; list-style: none; background: var(--demo-surface); }\n.list li { padding: 0.25rem 0; }\n.list.contained { overscroll-behavior-y: contain; }\n.list:focus-visible { outline: 2px solid var(--demo-accent); outline-offset: 2px; }\n.filler { height: 300px; margin-top: 0.75rem; display: grid; place-items: center; color: var(--demo-muted); border: 1px dashed var(--demo-border); border-radius: 6px; }",1789717746455]