[{"data":1,"prerenderedAt":2336},["ShallowReactive",2],{"page-\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fhorizontal-scrolling-card-rows\u002F":3,"content-all-pages":1772,"live-demo:snap-card-row":2330},{"id":4,"title":5,"body":6,"description":1754,"extension":1755,"meta":1756,"navigation":252,"path":1768,"seo":1769,"stem":1770,"__hash__":1771},"content\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fhorizontal-scrolling-card-rows\u002Findex.md","Horizontal Scrolling Card Rows: Swipeable Lists That Stay in Their Lane",{"type":7,"value":8,"toc":1744},"minimark",[9,13,33,38,41,53,56,60,63,67,1215,1222,1226,1242,1323,1342,1346,1349,1352,1361,1369,1372,1376,1383,1439,1631,1643,1647,1665,1669,1681,1687,1702,1708,1712,1741],[10,11,5],"h1",{"id":12},"horizontal-scrolling-card-rows-swipeable-lists-that-stay-in-their-lane",[14,15,16,17,22,23,27,28,32],"p",{},"Streaming apps and shops have trained users to swipe sideways through rows of cards — \"Continue watching\", \"Related products\", \"More from this author\". On a phone, those rows save vertical space and let one screen hold several categories. On a desktop, the same content often reads better as a wrapping grid. The narrow problem here is building one row that scrolls horizontally when space is tight, wraps into a grid when space is generous, and never drags the rest of the page sideways. It is a lighter cousin of the ",[18,19,21],"a",{"href":20},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fcss-only-carousel-with-scroll-snap\u002F","CSS-only carousel",", and part of ",[18,24,26],{"href":25},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002F","Scroll Snap & Overflow Layouts"," in the ",[18,29,31],{"href":30},"\u002Fmastering-container-queries-responsive-layouts\u002F","Mastering Container Queries & Responsive Layouts"," guide.",[34,35,37],"h2",{"id":36},"why-a-scrolling-row-and-when-not","Why a scrolling row, and when not",[14,39,40],{},"The choice between scrolling and wrapping is a content decision before it is a CSS decision. A scrolling row hides most of its items behind a gesture, which is acceptable when the items are interchangeable suggestions and costly when each item matters. Search results, the steps of a process and navigation should wrap. Browse lists, recommendations and category shelves can scroll.",[14,42,43,44,48,49,52],{},"The engineering argument for doing it in CSS is the same as for the carousel: native scrolling handles touch momentum, trackpads, wheels and keyboard input, and runs on the compositor. A card row does not even need the strict one-at-a-time behaviour of a carousel. Users skim these lists, so the snapping is gentler — ",[45,46,47],"code",{},"proximity"," rather than ",[45,50,51],{},"mandatory"," — and multiple cards are visible at once.",[14,54,55],{},"The accessibility cost is manageable if the row is honest about being scrollable. A visible scrollbar or a clear peek of the next card is the difference between \"I can see there is more\" and \"I thought that was everything\".",[34,57,59],{"id":58},"the-complete-implementation","The complete implementation",[14,61,62],{},"The row below scrolls with proximity snapping on narrow containers and turns into a wrapping grid once its container is wide enough to show everything. Drag the demo wider to watch the switch.",[64,65],"live-demo",{"name":66},"snap-card-row",[68,69,74],"pre",{"className":70,"code":71,"language":72,"meta":73,"style":73},"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>Scrolling card row\u003C\u002Ftitle>\n\u003Cstyle>\n  body { font: 15px\u002F1.5 system-ui, sans-serif; margin: 1.5rem; }\n\n  \u002F* The wrapper is the query container. *\u002F\n  .shelf { container-type: inline-size; }\n\n  .row {\n    display: grid;\n    grid-auto-flow: column;\n    \u002F* Cards are a fixed comfortable width; the row is as long as it needs. *\u002F\n    grid-auto-columns: 11rem;\n    gap: 0.75rem;\n\n    overflow-x: auto;\n    overscroll-behavior-inline: contain;\n    scroll-snap-type: inline proximity;   \u002F* gentle: snaps only when close *\u002F\n    scroll-padding-inline: 0.25rem;\n    padding: 0.25rem 0.25rem 0.75rem;\n\n    \u002F* A thin, visible scrollbar: a cue that the row scrolls. *\u002F\n    scrollbar-width: thin;\n    scrollbar-color: #94a3b8 transparent;\n  }\n\n  .row:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }\n\n  .card {\n    scroll-snap-align: start;\n    padding: 0.75rem;\n    border: 1px solid #cbd5e1;\n    border-radius: 10px;\n  }\n  .card__thumb {\n    aspect-ratio: 4 \u002F 3;\n    border-radius: 6px;\n    background: linear-gradient(135deg, #e0e7ff, #a5b4fc);\n  }\n  .card h3 { font-size: 0.95rem; margin: 0.5rem 0 0; }\n\n  \u002F* Wide container: stop scrolling and wrap into a grid instead. *\u002F\n  @container (width > 44rem) {\n    .row {\n      grid-auto-flow: row;\n      grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));\n      overflow-x: visible;\n      scroll-snap-type: none;\n    }\n  }\n\u003C\u002Fstyle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Csection class=\"shelf\" aria-labelledby=\"shelf-title\">\n    \u003Ch2 id=\"shelf-title\">More from this author\u003C\u002Fh2>\n    \u003Cdiv class=\"row\" tabindex=\"0\" role=\"group\" aria-label=\"More from this author\">\n      \u003Carticle class=\"card\">\u003Cdiv class=\"card__thumb\">\u003C\u002Fdiv>\u003Ch3>Night Trains\u003C\u002Fh3>\u003C\u002Farticle>\n      \u003Carticle class=\"card\">\u003Cdiv class=\"card__thumb\">\u003C\u002Fdiv>\u003Ch3>Harbour Lights\u003C\u002Fh3>\u003C\u002Farticle>\n      \u003Carticle class=\"card\">\u003Cdiv class=\"card__thumb\">\u003C\u002Fdiv>\u003Ch3>The Salt Road\u003C\u002Fh3>\u003C\u002Farticle>\n      \u003Carticle class=\"card\">\u003Cdiv class=\"card__thumb\">\u003C\u002Fdiv>\u003Ch3>Winter Orchard\u003C\u002Fh3>\u003C\u002Farticle>\n      \u003Carticle class=\"card\">\u003Cdiv class=\"card__thumb\">\u003C\u002Fdiv>\u003Ch3>Signal Hill\u003C\u002Fh3>\u003C\u002Farticle>\n    \u003C\u002Fdiv>\n  \u003C\u002Fsection>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n","html","",[45,75,76,96,116,126,144,169,184,194,247,254,261,275,280,289,303,316,322,337,352,357,370,383,403,418,442,447,453,466,482,488,493,530,535,543,556,569,589,604,609,617,636,650,683,688,726,731,737,746,754,767,804,817,830,836,841,851,860,870,897,919,960,1009,1051,1093,1135,1177,1187,1197,1206],{"__ignoreMap":73},[77,78,81,85,89,93],"span",{"class":79,"line":80},"line",1,[77,82,84],{"class":83},"suds8","\u003C!",[77,86,88],{"class":87},"sne4z","doctype",[77,90,92],{"class":91},"s-5SL"," html",[77,94,95],{"class":83},">\n",[77,97,99,102,104,107,110,114],{"class":79,"line":98},2,[77,100,101],{"class":83},"\u003C",[77,103,72],{"class":87},[77,105,106],{"class":91}," lang",[77,108,109],{"class":83},"=",[77,111,113],{"class":112},"sT6z2","\"en\"",[77,115,95],{"class":83},[77,117,119,121,124],{"class":79,"line":118},3,[77,120,101],{"class":83},[77,122,123],{"class":87},"head",[77,125,95],{"class":83},[77,127,129,131,134,137,139,142],{"class":79,"line":128},4,[77,130,101],{"class":83},[77,132,133],{"class":87},"meta",[77,135,136],{"class":91}," charset",[77,138,109],{"class":83},[77,140,141],{"class":112},"\"utf-8\"",[77,143,95],{"class":83},[77,145,147,149,151,154,156,159,162,164,167],{"class":79,"line":146},5,[77,148,101],{"class":83},[77,150,133],{"class":87},[77,152,153],{"class":91}," name",[77,155,109],{"class":83},[77,157,158],{"class":112},"\"viewport\"",[77,160,161],{"class":91}," content",[77,163,109],{"class":83},[77,165,166],{"class":112},"\"width=device-width, initial-scale=1\"",[77,168,95],{"class":83},[77,170,172,174,177,180,182],{"class":79,"line":171},6,[77,173,101],{"class":83},[77,175,176],{"class":87},"title",[77,178,179],{"class":83},">Scrolling card row\u003C\u002F",[77,181,176],{"class":87},[77,183,95],{"class":83},[77,185,187,189,192],{"class":79,"line":186},7,[77,188,101],{"class":83},[77,190,191],{"class":87},"style",[77,193,95],{"class":83},[77,195,197,200,203,206,209,212,216,219,222,225,228,231,234,237,239,241,244],{"class":79,"line":196},8,[77,198,199],{"class":87},"  body",[77,201,202],{"class":83}," { ",[77,204,205],{"class":91},"font",[77,207,208],{"class":83},": ",[77,210,211],{"class":91},"15",[77,213,215],{"class":214},"sHUrx","px",[77,217,218],{"class":83},"\u002F",[77,220,221],{"class":91},"1.5",[77,223,224],{"class":91}," system-ui",[77,226,227],{"class":83},", ",[77,229,230],{"class":91},"sans-serif",[77,232,233],{"class":83},"; ",[77,235,236],{"class":91},"margin",[77,238,208],{"class":83},[77,240,221],{"class":91},[77,242,243],{"class":214},"rem",[77,245,246],{"class":83},"; }\n",[77,248,250],{"class":79,"line":249},9,[77,251,253],{"emptyLinePlaceholder":252},true,"\n",[77,255,257],{"class":79,"line":256},10,[77,258,260],{"class":259},"sLBg1","  \u002F* The wrapper is the query container. *\u002F\n",[77,262,264,267,269,272],{"class":79,"line":263},11,[77,265,266],{"class":91},"  .shelf",[77,268,202],{"class":83},[77,270,271],{"class":91},"container-type",[77,273,274],{"class":83},": inline-size; }\n",[77,276,278],{"class":79,"line":277},12,[77,279,253],{"emptyLinePlaceholder":252},[77,281,283,286],{"class":79,"line":282},13,[77,284,285],{"class":91},"  .row",[77,287,288],{"class":83}," {\n",[77,290,292,295,297,300],{"class":79,"line":291},14,[77,293,294],{"class":91},"    display",[77,296,208],{"class":83},[77,298,299],{"class":91},"grid",[77,301,302],{"class":83},";\n",[77,304,306,309,311,314],{"class":79,"line":305},15,[77,307,308],{"class":91},"    grid-auto-flow",[77,310,208],{"class":83},[77,312,313],{"class":91},"column",[77,315,302],{"class":83},[77,317,319],{"class":79,"line":318},16,[77,320,321],{"class":259},"    \u002F* Cards are a fixed comfortable width; the row is as long as it needs. *\u002F\n",[77,323,325,328,330,333,335],{"class":79,"line":324},17,[77,326,327],{"class":91},"    grid-auto-columns",[77,329,208],{"class":83},[77,331,332],{"class":91},"11",[77,334,243],{"class":214},[77,336,302],{"class":83},[77,338,340,343,345,348,350],{"class":79,"line":339},18,[77,341,342],{"class":91},"    gap",[77,344,208],{"class":83},[77,346,347],{"class":91},"0.75",[77,349,243],{"class":214},[77,351,302],{"class":83},[77,353,355],{"class":79,"line":354},19,[77,356,253],{"emptyLinePlaceholder":252},[77,358,360,363,365,368],{"class":79,"line":359},20,[77,361,362],{"class":91},"    overflow-x",[77,364,208],{"class":83},[77,366,367],{"class":91},"auto",[77,369,302],{"class":83},[77,371,373,376,378,381],{"class":79,"line":372},21,[77,374,375],{"class":91},"    overscroll-behavior-inline",[77,377,208],{"class":83},[77,379,380],{"class":91},"contain",[77,382,302],{"class":83},[77,384,386,389,391,394,397,400],{"class":79,"line":385},22,[77,387,388],{"class":91},"    scroll-snap-type",[77,390,208],{"class":83},[77,392,393],{"class":91},"inline",[77,395,396],{"class":91}," proximity",[77,398,399],{"class":83},";   ",[77,401,402],{"class":259},"\u002F* gentle: snaps only when close *\u002F\n",[77,404,406,409,411,414,416],{"class":79,"line":405},23,[77,407,408],{"class":91},"    scroll-padding-inline",[77,410,208],{"class":83},[77,412,413],{"class":91},"0.25",[77,415,243],{"class":214},[77,417,302],{"class":83},[77,419,421,424,426,428,430,433,435,438,440],{"class":79,"line":420},24,[77,422,423],{"class":91},"    padding",[77,425,208],{"class":83},[77,427,413],{"class":91},[77,429,243],{"class":214},[77,431,432],{"class":91}," 0.25",[77,434,243],{"class":214},[77,436,437],{"class":91}," 0.75",[77,439,243],{"class":214},[77,441,302],{"class":83},[77,443,445],{"class":79,"line":444},25,[77,446,253],{"emptyLinePlaceholder":252},[77,448,450],{"class":79,"line":449},26,[77,451,452],{"class":259},"    \u002F* A thin, visible scrollbar: a cue that the row scrolls. *\u002F\n",[77,454,456,459,461,464],{"class":79,"line":455},27,[77,457,458],{"class":91},"    scrollbar-width",[77,460,208],{"class":83},[77,462,463],{"class":91},"thin",[77,465,302],{"class":83},[77,467,469,472,474,477,480],{"class":79,"line":468},28,[77,470,471],{"class":91},"    scrollbar-color",[77,473,208],{"class":83},[77,475,476],{"class":91},"#94a3b8",[77,478,479],{"class":91}," transparent",[77,481,302],{"class":83},[77,483,485],{"class":79,"line":484},29,[77,486,487],{"class":83},"  }\n",[77,489,491],{"class":79,"line":490},30,[77,492,253],{"emptyLinePlaceholder":252},[77,494,496,499,501,504,506,509,511,514,517,519,522,524,526,528],{"class":79,"line":495},31,[77,497,498],{"class":91},"  .row:focus-visible",[77,500,202],{"class":83},[77,502,503],{"class":91},"outline",[77,505,208],{"class":83},[77,507,508],{"class":91},"2",[77,510,215],{"class":214},[77,512,513],{"class":91}," solid",[77,515,516],{"class":91}," #2563eb",[77,518,233],{"class":83},[77,520,521],{"class":91},"outline-offset",[77,523,208],{"class":83},[77,525,508],{"class":91},[77,527,215],{"class":214},[77,529,246],{"class":83},[77,531,533],{"class":79,"line":532},32,[77,534,253],{"emptyLinePlaceholder":252},[77,536,538,541],{"class":79,"line":537},33,[77,539,540],{"class":91},"  .card",[77,542,288],{"class":83},[77,544,546,549,551,554],{"class":79,"line":545},34,[77,547,548],{"class":91},"    scroll-snap-align",[77,550,208],{"class":83},[77,552,553],{"class":91},"start",[77,555,302],{"class":83},[77,557,559,561,563,565,567],{"class":79,"line":558},35,[77,560,423],{"class":91},[77,562,208],{"class":83},[77,564,347],{"class":91},[77,566,243],{"class":214},[77,568,302],{"class":83},[77,570,572,575,577,580,582,584,587],{"class":79,"line":571},36,[77,573,574],{"class":91},"    border",[77,576,208],{"class":83},[77,578,579],{"class":91},"1",[77,581,215],{"class":214},[77,583,513],{"class":91},[77,585,586],{"class":91}," #cbd5e1",[77,588,302],{"class":83},[77,590,592,595,597,600,602],{"class":79,"line":591},37,[77,593,594],{"class":91},"    border-radius",[77,596,208],{"class":83},[77,598,599],{"class":91},"10",[77,601,215],{"class":214},[77,603,302],{"class":83},[77,605,607],{"class":79,"line":606},38,[77,608,487],{"class":83},[77,610,612,615],{"class":79,"line":611},39,[77,613,614],{"class":91},"  .card__thumb",[77,616,288],{"class":83},[77,618,620,623,625,628,631,634],{"class":79,"line":619},40,[77,621,622],{"class":91},"    aspect-ratio",[77,624,208],{"class":83},[77,626,627],{"class":91},"4",[77,629,630],{"class":83}," \u002F ",[77,632,633],{"class":91},"3",[77,635,302],{"class":83},[77,637,639,641,643,646,648],{"class":79,"line":638},41,[77,640,594],{"class":91},[77,642,208],{"class":83},[77,644,645],{"class":91},"6",[77,647,215],{"class":214},[77,649,302],{"class":83},[77,651,653,656,658,661,664,667,670,672,675,677,680],{"class":79,"line":652},42,[77,654,655],{"class":91},"    background",[77,657,208],{"class":83},[77,659,660],{"class":91},"linear-gradient",[77,662,663],{"class":83},"(",[77,665,666],{"class":91},"135",[77,668,669],{"class":214},"deg",[77,671,227],{"class":83},[77,673,674],{"class":91},"#e0e7ff",[77,676,227],{"class":83},[77,678,679],{"class":91},"#a5b4fc",[77,681,682],{"class":83},");\n",[77,684,686],{"class":79,"line":685},43,[77,687,487],{"class":83},[77,689,691,693,696,698,701,703,706,708,710,712,714,717,719,722,724],{"class":79,"line":690},44,[77,692,540],{"class":91},[77,694,695],{"class":87}," h3",[77,697,202],{"class":83},[77,699,700],{"class":91},"font-size",[77,702,208],{"class":83},[77,704,705],{"class":91},"0.95",[77,707,243],{"class":214},[77,709,233],{"class":83},[77,711,236],{"class":91},[77,713,208],{"class":83},[77,715,716],{"class":91},"0.5",[77,718,243],{"class":214},[77,720,721],{"class":91}," 0",[77,723,721],{"class":91},[77,725,246],{"class":83},[77,727,729],{"class":79,"line":728},45,[77,730,253],{"emptyLinePlaceholder":252},[77,732,734],{"class":79,"line":733},46,[77,735,736],{"class":259},"  \u002F* Wide container: stop scrolling and wrap into a grid instead. *\u002F\n",[77,738,740,743],{"class":79,"line":739},47,[77,741,742],{"class":214},"  @container",[77,744,745],{"class":83}," (width > 44rem) {\n",[77,747,749,752],{"class":79,"line":748},48,[77,750,751],{"class":91},"    .row",[77,753,288],{"class":83},[77,755,757,760,762,765],{"class":79,"line":756},49,[77,758,759],{"class":91},"      grid-auto-flow",[77,761,208],{"class":83},[77,763,764],{"class":91},"row",[77,766,302],{"class":83},[77,768,770,773,775,778,780,783,785,788,790,792,794,796,798,801],{"class":79,"line":769},50,[77,771,772],{"class":91},"      grid-template-columns",[77,774,208],{"class":83},[77,776,777],{"class":91},"repeat",[77,779,663],{"class":83},[77,781,782],{"class":91},"auto-fill",[77,784,227],{"class":83},[77,786,787],{"class":91},"minmax",[77,789,663],{"class":83},[77,791,332],{"class":91},[77,793,243],{"class":214},[77,795,227],{"class":83},[77,797,579],{"class":91},[77,799,800],{"class":214},"fr",[77,802,803],{"class":83},"));\n",[77,805,807,810,812,815],{"class":79,"line":806},51,[77,808,809],{"class":91},"      overflow-x",[77,811,208],{"class":83},[77,813,814],{"class":91},"visible",[77,816,302],{"class":83},[77,818,820,823,825,828],{"class":79,"line":819},52,[77,821,822],{"class":91},"      scroll-snap-type",[77,824,208],{"class":83},[77,826,827],{"class":91},"none",[77,829,302],{"class":83},[77,831,833],{"class":79,"line":832},53,[77,834,835],{"class":83},"    }\n",[77,837,839],{"class":79,"line":838},54,[77,840,487],{"class":83},[77,842,844,847,849],{"class":79,"line":843},55,[77,845,846],{"class":83},"\u003C\u002F",[77,848,191],{"class":87},[77,850,95],{"class":83},[77,852,854,856,858],{"class":79,"line":853},56,[77,855,846],{"class":83},[77,857,123],{"class":87},[77,859,95],{"class":83},[77,861,863,865,868],{"class":79,"line":862},57,[77,864,101],{"class":83},[77,866,867],{"class":87},"body",[77,869,95],{"class":83},[77,871,873,876,879,882,884,887,890,892,895],{"class":79,"line":872},58,[77,874,875],{"class":83},"  \u003C",[77,877,878],{"class":87},"section",[77,880,881],{"class":91}," class",[77,883,109],{"class":83},[77,885,886],{"class":112},"\"shelf\"",[77,888,889],{"class":91}," aria-labelledby",[77,891,109],{"class":83},[77,893,894],{"class":112},"\"shelf-title\"",[77,896,95],{"class":83},[77,898,900,903,905,908,910,912,915,917],{"class":79,"line":899},59,[77,901,902],{"class":83},"    \u003C",[77,904,34],{"class":87},[77,906,907],{"class":91}," id",[77,909,109],{"class":83},[77,911,894],{"class":112},[77,913,914],{"class":83},">More from this author\u003C\u002F",[77,916,34],{"class":87},[77,918,95],{"class":83},[77,920,922,924,927,929,931,934,937,939,942,945,947,950,953,955,958],{"class":79,"line":921},60,[77,923,902],{"class":83},[77,925,926],{"class":87},"div",[77,928,881],{"class":91},[77,930,109],{"class":83},[77,932,933],{"class":112},"\"row\"",[77,935,936],{"class":91}," tabindex",[77,938,109],{"class":83},[77,940,941],{"class":112},"\"0\"",[77,943,944],{"class":91}," role",[77,946,109],{"class":83},[77,948,949],{"class":112},"\"group\"",[77,951,952],{"class":91}," aria-label",[77,954,109],{"class":83},[77,956,957],{"class":112},"\"More from this author\"",[77,959,95],{"class":83},[77,961,963,966,969,971,973,976,979,981,983,985,988,991,993,995,998,1001,1003,1005,1007],{"class":79,"line":962},61,[77,964,965],{"class":83},"      \u003C",[77,967,968],{"class":87},"article",[77,970,881],{"class":91},[77,972,109],{"class":83},[77,974,975],{"class":112},"\"card\"",[77,977,978],{"class":83},">\u003C",[77,980,926],{"class":87},[77,982,881],{"class":91},[77,984,109],{"class":83},[77,986,987],{"class":112},"\"card__thumb\"",[77,989,990],{"class":83},">\u003C\u002F",[77,992,926],{"class":87},[77,994,978],{"class":83},[77,996,997],{"class":87},"h3",[77,999,1000],{"class":83},">Night Trains\u003C\u002F",[77,1002,997],{"class":87},[77,1004,990],{"class":83},[77,1006,968],{"class":87},[77,1008,95],{"class":83},[77,1010,1012,1014,1016,1018,1020,1022,1024,1026,1028,1030,1032,1034,1036,1038,1040,1043,1045,1047,1049],{"class":79,"line":1011},62,[77,1013,965],{"class":83},[77,1015,968],{"class":87},[77,1017,881],{"class":91},[77,1019,109],{"class":83},[77,1021,975],{"class":112},[77,1023,978],{"class":83},[77,1025,926],{"class":87},[77,1027,881],{"class":91},[77,1029,109],{"class":83},[77,1031,987],{"class":112},[77,1033,990],{"class":83},[77,1035,926],{"class":87},[77,1037,978],{"class":83},[77,1039,997],{"class":87},[77,1041,1042],{"class":83},">Harbour Lights\u003C\u002F",[77,1044,997],{"class":87},[77,1046,990],{"class":83},[77,1048,968],{"class":87},[77,1050,95],{"class":83},[77,1052,1054,1056,1058,1060,1062,1064,1066,1068,1070,1072,1074,1076,1078,1080,1082,1085,1087,1089,1091],{"class":79,"line":1053},63,[77,1055,965],{"class":83},[77,1057,968],{"class":87},[77,1059,881],{"class":91},[77,1061,109],{"class":83},[77,1063,975],{"class":112},[77,1065,978],{"class":83},[77,1067,926],{"class":87},[77,1069,881],{"class":91},[77,1071,109],{"class":83},[77,1073,987],{"class":112},[77,1075,990],{"class":83},[77,1077,926],{"class":87},[77,1079,978],{"class":83},[77,1081,997],{"class":87},[77,1083,1084],{"class":83},">The Salt Road\u003C\u002F",[77,1086,997],{"class":87},[77,1088,990],{"class":83},[77,1090,968],{"class":87},[77,1092,95],{"class":83},[77,1094,1096,1098,1100,1102,1104,1106,1108,1110,1112,1114,1116,1118,1120,1122,1124,1127,1129,1131,1133],{"class":79,"line":1095},64,[77,1097,965],{"class":83},[77,1099,968],{"class":87},[77,1101,881],{"class":91},[77,1103,109],{"class":83},[77,1105,975],{"class":112},[77,1107,978],{"class":83},[77,1109,926],{"class":87},[77,1111,881],{"class":91},[77,1113,109],{"class":83},[77,1115,987],{"class":112},[77,1117,990],{"class":83},[77,1119,926],{"class":87},[77,1121,978],{"class":83},[77,1123,997],{"class":87},[77,1125,1126],{"class":83},">Winter Orchard\u003C\u002F",[77,1128,997],{"class":87},[77,1130,990],{"class":83},[77,1132,968],{"class":87},[77,1134,95],{"class":83},[77,1136,1138,1140,1142,1144,1146,1148,1150,1152,1154,1156,1158,1160,1162,1164,1166,1169,1171,1173,1175],{"class":79,"line":1137},65,[77,1139,965],{"class":83},[77,1141,968],{"class":87},[77,1143,881],{"class":91},[77,1145,109],{"class":83},[77,1147,975],{"class":112},[77,1149,978],{"class":83},[77,1151,926],{"class":87},[77,1153,881],{"class":91},[77,1155,109],{"class":83},[77,1157,987],{"class":112},[77,1159,990],{"class":83},[77,1161,926],{"class":87},[77,1163,978],{"class":83},[77,1165,997],{"class":87},[77,1167,1168],{"class":83},">Signal Hill\u003C\u002F",[77,1170,997],{"class":87},[77,1172,990],{"class":83},[77,1174,968],{"class":87},[77,1176,95],{"class":83},[77,1178,1180,1183,1185],{"class":79,"line":1179},66,[77,1181,1182],{"class":83},"    \u003C\u002F",[77,1184,926],{"class":87},[77,1186,95],{"class":83},[77,1188,1190,1193,1195],{"class":79,"line":1189},67,[77,1191,1192],{"class":83},"  \u003C\u002F",[77,1194,878],{"class":87},[77,1196,95],{"class":83},[77,1198,1200,1202,1204],{"class":79,"line":1199},68,[77,1201,846],{"class":83},[77,1203,867],{"class":87},[77,1205,95],{"class":83},[77,1207,1209,1211,1213],{"class":79,"line":1208},69,[77,1210,846],{"class":83},[77,1212,72],{"class":87},[77,1214,95],{"class":83},[14,1216,1217,1218,1221],{},"The switch is the part worth studying. The container query changes three things together: the flow direction (so the grid auto-places into rows), the track definition (so columns share the width), and the overflow and snap settings (so a wide row does not remain a scroll container with nothing to scroll). Leaving ",[45,1219,1220],{},"scroll-snap-type"," set on a non-scrolling element is harmless, but resetting it keeps the computed styles honest when debugging.",[34,1223,1225],{"id":1224},"the-key-technique-containing-overflow-to-the-row","The key technique: containing overflow to the row",[14,1227,1228,1229,1232,1233,1236,1237,1241],{},"The most common bug with scrolling rows is not in the row at all. The row is correctly ",[45,1230,1231],{},"overflow-x: auto",", but it sits inside a grid or flex ancestor whose item defaults to ",[45,1234,1235],{},"min-width: auto",". That automatic minimum lets the ancestor grow to the row's full content width, so the row never overflows itself — the ",[1238,1239,1240],"em",{},"page"," does.",[1243,1244,1250,1251,1250,1254,1250,1258,1250,1266,1250,1273,1250,1279,1250,1288,1250,1294,1250,1298,1250,1302,1250,1306,1250,1309,1250,1314,1250,1319],"svg",{"viewBox":1245,"role":1246,"ariaLabel":1247,"xmlns":1248,"style":1249},"0 0 720 300","img","A scrolling row inside a grid item: without min-width zero the grid item grows and the page scrolls; with it the row scrolls internally","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","width:100%;height:auto;max-width:720px;margin:2rem 0","\n  ",[176,1252,1253],{},"Where the overflow ends up",[1255,1256,1257],"desc",{},"Top: a grid item with min-width auto grows to the full length of the card row, pushing past the viewport and creating a page-level horizontal scrollbar. Bottom: with min-width 0 the grid item stays within the viewport and the row scrolls inside itself.",[1259,1260,1265],"text",{"textAnchor":1261,"x":1262,"y":1263,"style":1264},"middle","360","26","text-anchor:middle;fill:currentColor;font:700 17px sans-serif","The ancestor decides who scrolls",[1267,1268],"path",{"d":1269,"fill":827,"stroke":1270,"strokeWidth":508,"strokeDashArray":1271,"opacity":1272},"M40 46 H420 V136 H40 Z","currentColor",[645,627],"0.7",[1259,1274,1278],{"textAnchor":553,"x":1275,"y":1276,"style":1277},"46","62","text-anchor:start;fill:currentColor;font:11px sans-serif","viewport",[1280,1281],"rect",{"x":1282,"y":1283,"width":1284,"height":1285,"rx":645,"fill":1286,"opacity":1287},"60","72","620","52","#7aa2ff","0.16",[1259,1289,1293],{"textAnchor":1261,"x":1290,"y":1291,"style":1292},"550","103","text-anchor:middle;fill:currentColor;font:12px sans-serif","grid item grew past the viewport",[1259,1295,1235],{"textAnchor":1261,"x":1296,"y":1291,"style":1297},"240","text-anchor:middle;fill:currentColor;font:12px ui-monospace,monospace",[1259,1299,1301],{"textAnchor":1261,"x":1262,"y":1300,"style":1292},"156","page scrolls sideways",[1267,1303],{"d":1304,"fill":827,"stroke":1270,"strokeWidth":508,"strokeDashArray":1305,"opacity":1272},"M40 176 H420 V266 H40 Z",[645,627],[1259,1307,1278],{"textAnchor":553,"x":1275,"y":1308,"style":1277},"192",[1280,1310],{"x":1282,"y":1311,"width":1312,"height":1285,"rx":645,"fill":1286,"opacity":1313},"202","340","0.34",[1259,1315,1318],{"textAnchor":1261,"x":1316,"y":1317,"style":1297},"230","233","min-width: 0 · row scrolls",[1259,1320,1322],{"textAnchor":1261,"x":1321,"y":1317,"style":1292},"560","page stays put",[14,1324,1325,1326,1329,1330,1333,1334,1336,1337,1341],{},"The fix is one declaration on whichever ancestor is a grid or flex item: ",[45,1327,1328],{},"min-width: 0",", or ",[45,1331,1332],{},"minmax(0, 1fr)"," in the parent's track definition. Once the ancestor is constrained to the available width, the row's ",[45,1335,1231],{}," has something to overflow against, and the scrollbar appears where it belongs. The mechanism is the same automatic minimum explained in ",[18,1338,1340],{"href":1339},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fpreventing-flex-and-grid-overflow\u002F","Preventing Flex and Grid Overflow",", and it catches scrolling rows more often than any other component.",[34,1343,1345],{"id":1344},"sizing-the-cards-for-the-gesture","Sizing the cards for the gesture",[14,1347,1348],{},"Card width in a scrolling row is not only a visual choice; it decides how the row feels to scroll. Three guidelines hold up across devices.",[14,1350,1351],{},"First, choose a width that leaves a visible fraction of the next card at the narrowest container the row will appear in. On a 360-pixel phone with 1rem page padding, 11rem cards with a 0.75rem gap show about one and three-quarter cards, which is a clear cue. Cards of exactly half the row width are the worst case: two fit perfectly, the seam lines up with the edge, and nothing peeks.",[14,1353,1354,1355,1357,1358,1360],{},"Second, prefer a fixed ",[45,1356,243],{}," width over a percentage for browse rows. A percentage makes each card a fraction of the row, so on a wide tablet the cards become huge and the row shows the same two items it showed on a phone. A ",[45,1359,243],{}," width shows more items as space grows, which is the point of a browse list. Carousels are the exception, because there each slide is meant to dominate the view.",[14,1362,1363,1364,1368],{},"Third, keep interactive targets inside cards large enough to tap while the row is moving. Users often tap a card to stop momentum scrolling; a whole-card link with a generous hit area handles that gracefully, whereas small buttons inside a moving card are easy to miss. If a card must contain several actions, space them by at least the target spacing discussed in ",[18,1365,1367],{"href":1366},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Ftarget-size-and-pointer-accessibility\u002F","Target Size and Pointer Accessibility",".",[14,1370,1371],{},"Finally, remember keyboard users. A focusable row scrolls with arrow keys, but tabbing through links inside the cards also scrolls each focused card into view automatically. Test both paths: arrow-key scrolling on the row itself, and Tab from card to card, checking that focused cards are never left half hidden behind a fade.",[34,1373,1375],{"id":1374},"variation-fading-edges-that-hint-at-more","Variation: fading edges that hint at more",[14,1377,1378,1379,1382],{},"A soft fade at the row's trailing edge is a stronger \"there is more\" cue than a scrollbar, and it can be drawn with ",[45,1380,1381],{},"mask-image"," without any extra elements. The mask is a gradient from opaque to transparent over the last few rem.",[1243,1384,1250,1387,1250,1390,1250,1393,1250,1396,1250,1412,1250,1419,1250,1422,1250,1425,1250,1430,1250,1435],{"viewBox":1385,"role":1246,"ariaLabel":1386,"xmlns":1248,"style":1249},"0 0 720 220","A card row with a gradient mask fading the last card at the trailing edge",[176,1388,1389],{},"A trailing-edge fade from mask-image",[1255,1391,1392],{},"Four cards in a row; the fourth fades toward transparent at the right edge under a linear-gradient mask, signalling that the row continues.",[1259,1394,1395],{"textAnchor":1261,"x":1262,"y":1263,"style":1264},"The mask fades content, not a colour overlay",[1397,1398,1399,1400,1250],"defs",{},"\n    ",[1401,1402,1405,1406,1405,1410,1399],"linearGradient",{"id":1403,"x1":1404,"x2":579,"y1":1404,"y2":1404},"fade-row","0","\n      ",[1407,1408],"stop",{"offset":1404,"stopColor":1286,"stopOpacity":1409},"0.4",[1407,1411],{"offset":579,"stopColor":1286,"stopOpacity":1404},[1280,1413],{"x":1414,"y":1415,"width":1416,"height":1417,"rx":1418,"fill":1286,"opacity":1409},"40","50","140","110","8",[1280,1420],{"x":1421,"y":1415,"width":1416,"height":1417,"rx":1418,"fill":1286,"opacity":1409},"196",[1280,1423],{"x":1424,"y":1415,"width":1416,"height":1417,"rx":1418,"fill":1286,"opacity":1409},"352",[1280,1426],{"x":1427,"y":1415,"width":1428,"height":1417,"rx":1418,"fill":1429},"508","172","url(#fade-row)",[1259,1431,1434],{"textAnchor":1261,"x":1432,"y":1433,"style":1297},"594","184","mask fades to 0",[1259,1436,1438],{"textAnchor":1261,"x":1437,"y":1433,"style":1292},"266","fully visible cards",[68,1440,1444],{"className":1441,"code":1442,"language":1443,"meta":73,"style":73},"language-css shiki shiki-themes github-light-high-contrast github-dark-high-contrast",".row {\n  \u002F* Fade the trailing 3rem. A mask fades the content itself, so it works\n     on any background, unlike a gradient overlay in the page colour. *\u002F\n  mask-image: linear-gradient(\n    to right,\n    #000 calc(100% - 3rem),\n    transparent\n  );\n}\n\n\u002F* In right-to-left text the trailing edge is on the left. *\u002F\n.row:dir(rtl) {\n  mask-image: linear-gradient(to left, #000 calc(100% - 3rem), transparent);\n}\n\n\u002F* Once the row wraps into a grid, nothing is hidden: remove the fade. *\u002F\n@container (width > 44rem) {\n  .row { mask-image: none; }\n}\n","css",[45,1445,1446,1453,1458,1463,1475,1486,1513,1518,1523,1528,1532,1537,1550,1593,1597,1601,1606,1613,1627],{"__ignoreMap":73},[77,1447,1448,1451],{"class":79,"line":80},[77,1449,1450],{"class":91},".row",[77,1452,288],{"class":83},[77,1454,1455],{"class":79,"line":98},[77,1456,1457],{"class":259},"  \u002F* Fade the trailing 3rem. A mask fades the content itself, so it works\n",[77,1459,1460],{"class":79,"line":118},[77,1461,1462],{"class":259},"     on any background, unlike a gradient overlay in the page colour. *\u002F\n",[77,1464,1465,1468,1470,1472],{"class":79,"line":128},[77,1466,1467],{"class":91},"  mask-image",[77,1469,208],{"class":83},[77,1471,660],{"class":91},[77,1473,1474],{"class":83},"(\n",[77,1476,1477,1480,1483],{"class":79,"line":146},[77,1478,1479],{"class":214},"    to",[77,1481,1482],{"class":91}," right",[77,1484,1485],{"class":83},",\n",[77,1487,1488,1491,1494,1496,1499,1502,1505,1508,1510],{"class":79,"line":171},[77,1489,1490],{"class":91},"    #000",[77,1492,1493],{"class":91}," calc",[77,1495,663],{"class":83},[77,1497,1498],{"class":91},"100",[77,1500,1501],{"class":214},"%",[77,1503,1504],{"class":214}," -",[77,1506,1507],{"class":91}," 3",[77,1509,243],{"class":214},[77,1511,1512],{"class":83},"),\n",[77,1514,1515],{"class":79,"line":186},[77,1516,1517],{"class":91},"    transparent\n",[77,1519,1520],{"class":79,"line":196},[77,1521,1522],{"class":83},"  );\n",[77,1524,1525],{"class":79,"line":249},[77,1526,1527],{"class":83},"}\n",[77,1529,1530],{"class":79,"line":256},[77,1531,253],{"emptyLinePlaceholder":252},[77,1533,1534],{"class":79,"line":263},[77,1535,1536],{"class":259},"\u002F* In right-to-left text the trailing edge is on the left. *\u002F\n",[77,1538,1539,1542,1544,1547],{"class":79,"line":277},[77,1540,1541],{"class":91},".row:dir",[77,1543,663],{"class":83},[77,1545,1546],{"class":91},"rtl",[77,1548,1549],{"class":83},") {\n",[77,1551,1552,1554,1556,1558,1560,1563,1566,1568,1571,1573,1575,1577,1579,1581,1583,1585,1588,1591],{"class":79,"line":282},[77,1553,1467],{"class":91},[77,1555,208],{"class":83},[77,1557,660],{"class":91},[77,1559,663],{"class":83},[77,1561,1562],{"class":214},"to",[77,1564,1565],{"class":91}," left",[77,1567,227],{"class":83},[77,1569,1570],{"class":91},"#000",[77,1572,1493],{"class":91},[77,1574,663],{"class":83},[77,1576,1498],{"class":91},[77,1578,1501],{"class":214},[77,1580,1504],{"class":214},[77,1582,1507],{"class":91},[77,1584,243],{"class":214},[77,1586,1587],{"class":83},"), ",[77,1589,1590],{"class":91},"transparent",[77,1592,682],{"class":83},[77,1594,1595],{"class":79,"line":291},[77,1596,1527],{"class":83},[77,1598,1599],{"class":79,"line":305},[77,1600,253],{"emptyLinePlaceholder":252},[77,1602,1603],{"class":79,"line":318},[77,1604,1605],{"class":259},"\u002F* Once the row wraps into a grid, nothing is hidden: remove the fade. *\u002F\n",[77,1607,1608,1611],{"class":79,"line":324},[77,1609,1610],{"class":214},"@container",[77,1612,745],{"class":83},[77,1614,1615,1617,1619,1621,1623,1625],{"class":79,"line":339},[77,1616,285],{"class":91},[77,1618,202],{"class":83},[77,1620,1381],{"class":91},[77,1622,208],{"class":83},[77,1624,827],{"class":91},[77,1626,246],{"class":83},[77,1628,1629],{"class":79,"line":354},[77,1630,1527],{"class":83},[14,1632,1633,1634,1637,1638,1642],{},"A mask applies to the element's whole box, so the fade stays fixed at the right edge while content scrolls underneath it — which is exactly the desired effect. The limitation is that the fade remains even when the user has scrolled to the end. Scroll-driven animations can fix that by animating the mask's stop position with a ",[45,1635,1636],{},"scroll(self inline)"," timeline, so the fade disappears as the end approaches; the technique is covered in ",[18,1639,1641],{"href":1640},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002F","Scroll-Driven Animations"," and needs a static fallback where those animations are unsupported. The fade itself is decorative and must never be the only indication of focus or content.",[34,1644,1646],{"id":1645},"browser-support","Browser support",[14,1648,1649,1650,1653,1654,1657,1658,1661,1662,1664],{},"Scroll snap and ",[45,1651,1652],{},"overscroll-behavior"," are supported in all current engines. ",[45,1655,1656],{},"scrollbar-width"," and ",[45,1659,1660],{},"scrollbar-color"," are supported in current Firefox and Chromium-based browsers; Safari ignores them and draws its default overlay scrollbar, which is an acceptable fallback. ",[45,1663,1381],{}," is supported unprefixed in current versions of all three engines. The container query that switches between scrolling and wrapping needs Chrome and Edge 105+, Firefox 110+ or Safari 16+; without it the row simply scrolls at every width.",[34,1666,1668],{"id":1667},"faq","FAQ",[14,1670,1671,1675,1676,1657,1678,1680],{},[1672,1673,1674],"strong",{},"Should I hide the scrollbar on a horizontal card row?","\nNot entirely. The scrollbar is one of the few visible cues that more content exists to the side, and hiding it removes that cue for mouse users who cannot swipe. Thin it with ",[45,1677,1656],{},[45,1679,1660],{}," instead, and add a visible peek of the next card.",[14,1682,1683,1686],{},[1672,1684,1685],{},"When should a card row scroll instead of wrap?","\nScroll when the row is a secondary browse list whose items are equivalent, such as related articles or categories, and vertical space is precious. Wrap when every item matters and users should see them all without extra gestures, such as the main results of a search.",[14,1688,1689,1692,1693,1695,1696,1698,1699,1701],{},[1672,1690,1691],{},"Why does my scrolling row make the whole page scroll sideways?","\nUsually a child has a fixed width wider than the row and the row is missing ",[45,1694,1231],{},", or a grid or flex ancestor lets the row grow to its content width. Give the row ",[45,1697,1231],{}," and make sure its ancestors have ",[45,1700,1328],{}," so it is constrained to the available width.",[14,1703,1704,1707],{},[1672,1705,1706],{},"Does a scrolling row pass WCAG reflow?","\nYes, if the scrolling is contained within the component. WCAG 1.4.10 exempts content that requires two-dimensional layout for usage and meaning, and a row that scrolls inside itself does not make the page scroll horizontally. The page as a whole must still reflow at 320 CSS pixels.",[34,1709,1711],{"id":1710},"related","Related",[1713,1714,1715,1721,1727,1734],"ul",{},[1716,1717,1718,1720],"li",{},[18,1719,26],{"href":25}," — the parent guide to scrolling layout.",[1716,1722,1723,1726],{},[18,1724,1725],{"href":20},"CSS-Only Carousel With Scroll Snap"," — the one-slide-at-a-time variant.",[1716,1728,1729,1733],{},[18,1730,1732],{"href":1731},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fauto-fit-minmax-responsive-grids\u002F","auto-fit and minmax() Grids"," — the wrapping layout the row switches to.",[1716,1735,1736,1740],{},[18,1737,1739],{"href":1738},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fmask-image-fade-edges\u002F","Mask Image Fade Edges"," — more on masks, including animated fades.",[191,1742,1743],{},"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":73,"searchDepth":98,"depth":98,"links":1745},[1746,1747,1748,1749,1750,1751,1752,1753],{"id":36,"depth":98,"text":37},{"id":58,"depth":98,"text":59},{"id":1224,"depth":98,"text":1225},{"id":1344,"depth":98,"text":1345},{"id":1374,"depth":98,"text":1375},{"id":1645,"depth":98,"text":1646},{"id":1667,"depth":98,"text":1668},{"id":1710,"depth":98,"text":1711},"Turn a wrapping grid into a swipeable row on narrow screens: overflow-x, proximity snapping, thin scrollbars, mask-image edge fades and a container query.","md",{"pageTitle":1757,"datePublished":1758,"dateModified":1758,"faq":1759},"Horizontal Scrolling Card Rows in CSS","2026-09-18",[1760,1762,1764,1766],{"q":1674,"a":1761},"Not entirely. The scrollbar is one of the few visible cues that more content exists to the side, and hiding it removes that cue for mouse users who cannot swipe. Thin it with scrollbar-width and scrollbar-color instead, and add a visible peek of the next card.",{"q":1685,"a":1763},"Scroll when the row is a secondary browse list whose items are equivalent, such as related articles or categories, and vertical space is precious. Wrap when every item matters and users should see them all without extra gestures, such as the main results of a search.",{"q":1691,"a":1765},"Usually a child has a fixed width wider than the row and the row is missing overflow-x: auto, or a grid or flex ancestor lets the row grow to its content width. Give the row overflow-x: auto and make sure its ancestors have min-width: 0 so it is constrained to the available width.",{"q":1706,"a":1767},"Yes, if the scrolling is contained within the component. WCAG 1.4.10 exempts content that requires two-dimensional layout for usage and meaning, and a row that scrolls inside itself does not make the page scroll horizontally. The page as a whole must still reflow at 320 CSS pixels.","\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fhorizontal-scrolling-card-rows",{"title":5,"description":1754},"mastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fhorizontal-scrolling-card-rows\u002Findex","XH4Ba5OpcNHyUfxhqPdefHYgXo0uqpQKLqn6f4Gv3uw",[1773,1776,1779,1782,1785,1788,1791,1794,1797,1800,1803,1806,1809,1812,1815,1818,1821,1824,1827,1830,1833,1836,1839,1842,1845,1848,1851,1854,1857,1860,1863,1866,1869,1872,1875,1878,1881,1884,1887,1890,1893,1896,1899,1902,1905,1908,1911,1914,1917,1920,1923,1926,1929,1932,1935,1938,1941,1944,1947,1950,1953,1956,1959,1962,1965,1968,1971,1974,1977,1980,1983,1986,1989,1992,1995,1998,2001,2004,2007,2010,2013,2016,2019,2022,2025,2028,2031,2034,2037,2040,2043,2046,2049,2052,2054,2057,2060,2063,2066,2069,2072,2075,2078,2081,2084,2087,2090,2093,2096,2099,2102,2105,2108,2111,2114,2117,2120,2123,2126,2129,2132,2135,2138,2141,2144,2147,2150,2153,2156,2159,2162,2165,2168,2171,2174,2177,2180,2183,2186,2189,2192,2194,2197,2200,2203,2206,2209,2212,2215,2218,2221,2224,2227,2230,2233,2236,2239,2242,2245,2248,2251,2254,2257,2260,2263,2266,2269,2272,2275,2278,2281,2284,2285,2288,2291,2294,2297,2300,2303,2306,2309,2312,2315,2318,2321,2324,2327],{"path":1774,"title":1775},"\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":1777,"title":1778},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fflashing-content-and-seizure-thresholds","Flashing Content and Seizure Thresholds",{"path":1780,"title":1781},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fforced-colors-mode-and-animations","Forced Colors Mode and Animations",{"path":1783,"title":1784},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations","Accessibility in CSS Animations: Patterns, Specs & Best Practices",{"path":1786,"title":1787},"\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":1789,"title":1790},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fprefers-reduced-motion-recipes","prefers-reduced-motion Recipes: A Reduction for Every Common Effect",{"path":1792,"title":1793},"\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":1795,"title":1796},"\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":1798,"title":1799},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fvestibular-safe-animation-patterns","Vestibular-Safe Animation Patterns: Why Some Motion Makes People Sick",{"path":1801,"title":1802},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fwcag-motion-success-criteria","WCAG Motion Success Criteria: What Each One Actually Requires",{"path":1804,"title":1805},"\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":1807,"title":1808},"\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":1810,"title":1811},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations","Clip-Path & Mask Animations: Animating Visibility Instead of Position",{"path":1813,"title":1814},"\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":1816,"title":1817},"\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":1819,"title":1820},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fanimating-gradients","Animating CSS Gradients: Smooth Colour Motion Without Jumps",{"path":1822,"title":1823},"\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":1825,"title":1826},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions","Color & Theme Transitions: Colour as Part of the Motion System",{"path":1828,"title":1829},"\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":1831,"title":1832},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fsmooth-theme-switching-transitions","Smooth Theme Switching: Crossfades, Circular Reveals and No Flash",{"path":1834,"title":1835},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fcontainer-query-hover-affordances","Container Query Hover Affordances: When Narrow Means Persistent, Not Hidden",{"path":1837,"title":1838},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion","Container-Aware Motion: Animation Sized by the Space a Component Actually Has",{"path":1840,"title":1841},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Flayout-change-animations-at-container-breakpoints","Animating Changes at Container Breakpoints",{"path":1843,"title":1844},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fmotion-driven-by-container-style-queries","Motion Driven by Container Style Queries",{"path":1846,"title":1847},"\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":1849,"title":1850},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fsuppressing-motion-in-small-containers","Suppressing Motion in Small Containers: Deliberately Animating Nothing",{"path":1852,"title":1853},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fcontrolling-css-animations-from-javascript","Controlling CSS Animations From JavaScript",{"path":1855,"title":1856},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api","CSS Animation vs the Web Animations API: A Decision Guide",{"path":1858,"title":1859},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fwaapi-vs-css-for-interruptible-ui","Interruptible UI: CSS Transitions vs WAAPI",{"path":1861,"title":1862},"\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":1864,"title":1865},"\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":1867,"title":1868},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fcustom-property-fallbacks-and-invalid-values","Custom Property Fallbacks and Invalid Values",{"path":1870,"title":1871},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Ffluid-spacing-tokens-driving-transition-durations","Fluid Spacing Tokens That Drive Transition Durations",{"path":1873,"title":1874},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture","CSS Custom Properties Architecture: Scalable Design Systems & Dynamic UI",{"path":1876,"title":1877},"\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":1879,"title":1880},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fscoping-custom-properties-to-components","Scoping Custom Properties to Components",{"path":1882,"title":1883},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fcss-transition-timing-functions","CSS Transition Timing Functions: ease, cubic-bezier(), steps() and linear()",{"path":1885,"title":1886},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals","CSS Transition Fundamentals: Architecture, Performance & Patterns",{"path":1888,"title":1889},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Finterrupted-and-reversing-transitions","Interrupted and Reversing Transitions: What Happens Mid-Flight",{"path":1891,"title":1892},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fstarting-style-entry-animations","@starting-style: Animating an Element's Very First Style Change",{"path":1894,"title":1895},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-delay-choreography","Choreographing Motion With transition-delay",{"path":1897,"title":1898},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-shorthand-and-multiple-properties","The transition Shorthand and Multiple Properties",{"path":1900,"title":1901},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransitioning-display-with-allow-discrete","Transitioning display with transition-behavior: allow-discrete and @starting-style",{"path":1903,"title":1904},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fanimating-dialog-open-and-close","Animating \u003Cdialog> Open and Close: Both Directions, No Library",{"path":1906,"title":1907},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fbackdrop-animations","Animating ::backdrop: Fades and Blurs Behind Dialogs and Popovers",{"path":1909,"title":1910},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations","Dialog & Popover Animations: Motion for the Top Layer",{"path":1912,"title":1913},"\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":1915,"title":1916},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fpopover-entry-and-exit-transitions","Popover Menus That Animate From Their Anchor",{"path":1918,"title":1919},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fchoosing-animation-durations","Choosing Animation Durations: How Long Motion Should Last",{"path":1921,"title":1922},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fcubic-bezier-overshoot-and-anticipation","Overshoot and Anticipation With cubic-bezier(): Motion With Character",{"path":1924,"title":1925},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fentry-vs-exit-easing","Entry vs Exit Easing: Different Curves for Arriving and Leaving",{"path":1927,"title":1928},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design","Easing & Motion Design: Making CSS Motion Feel Intentional",{"path":1930,"title":1931},"\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":1933,"title":1934},"\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":1936,"title":1937},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Faccessible-css-only-tooltips","Accessible CSS-Only Tooltips and Hover Cards With  and ",{"path":1939,"title":1940},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fbutton-press-and-active-states","Button Press and  States",{"path":1942,"title":1943},"\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":1945,"title":1946},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Ffocus-within-form-patterns"," Form Patterns: Styling a Group From the Field Inside It",{"path":1948,"title":1949},"\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":1951,"title":1952},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design","Hover & Focus State Design: Spec-Compliant Patterns for Modern UIs",{"path":1954,"title":1955},"\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":1957,"title":1958},"\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":1960,"title":1961},"\u002Fcss-only-micro-interactions-animations","CSS-Only Micro-Interactions & Animations: Architecture, Performance & Implementation",{"path":1963,"title":1964},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fanimation-composition-and-stacking","Stacking Animations With animation-composition",{"path":1966,"title":1967},"\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":1969,"title":1970},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcontainer-query-triggered-keyframe-animations","Container-Query-Triggered Keyframe Animations: Animate Differently per Available Space",{"path":1972,"title":1973},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-accordions-and-disclosure","CSS-Only Accordions and Disclosure Widgets with details and summary",{"path":1975,"title":1976},"\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":1978,"title":1979},"\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":1981,"title":1982},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns","Keyframe Animation Patterns: Spec-Compliant Architectures for Modern UIs",{"path":1984,"title":1985},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fmulti-step-keyframes-and-per-keyframe-easing","Multi-Step Keyframes and Per-Keyframe Easing",{"path":1987,"title":1988},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fstaggered-list-animations-with-custom-properties","Staggered List Animations Using --i Index Custom Properties",{"path":1990,"title":1991},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fanimating-box-shadow-and-filters-cheaply","Animating box-shadow and Filters Cheaply",{"path":1993,"title":1994},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcontain-property-for-animation-performance","The contain Property for Animation Performance",{"path":1996,"title":1997},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcss-triggers-layout-paint-composite","Layout, Paint and Composite: What Triggers What",{"path":1999,"title":2000},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration","Performance & GPU Acceleration in CSS: A Developer’s Blueprint",{"path":2002,"title":2003},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Foptimizing-css-animations-for-60fps","Optimizing CSS Animations for 60fps: Budgeting the Frame",{"path":2005,"title":2006},"\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":2008,"title":2009},"\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":2011,"title":2012},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations","Scroll-Driven Animations: Binding Motion to Scroll Position in Pure CSS",{"path":2014,"title":2015},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-animation-fallbacks","Shipping Scroll-Driven Animations Without Breaking Anything",{"path":2017,"title":2018},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-parallax-effects","Scroll-Driven Parallax Effects in CSS",{"path":2020,"title":2021},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-progress-bar-without-javascript","A Reading Progress Bar Driven by scroll(root)",{"path":2023,"title":2024},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-triggered-reveal-animations","Reveal-on-Scroll with view() and animation-range",{"path":2026,"title":2027},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Ftimeline-scope-for-cross-element-animations","timeline-scope for Cross-Element Animations",{"path":2029,"title":2030},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fview-timeline-and-animation-range","View Timelines and animation-range",{"path":2032,"title":2033},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fcross-document-view-transitions","Cross-Document View Transitions",{"path":2035,"title":2036},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers","View Transitions for CSS Developers: the Pseudo-Element Tree, Snapshots, and Named Elements",{"path":2038,"title":2039},"\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":2041,"title":2042},"\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":2044,"title":2045},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transition-types-and-classes","View Transition Types and Classes",{"path":2047,"title":2048},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-for-list-reordering","View Transitions for List Reordering",{"path":2050,"title":2051},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-with-reduced-motion","Honouring prefers-reduced-motion in View Transitions",{"path":218,"title":2053},"Modern CSS Layouts & Micro-Interactions",{"path":2055,"title":2056},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioned-tooltips","Anchor-Positioned Tooltips: Tethering, Flipping, and Getting the Semantics Right",{"path":2058,"title":2059},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioning-fallbacks","Anchor Positioning Fallbacks: A Graceful Floor for Older Browser Versions",{"path":2061,"title":2062},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-size-for-matching-widths","anchor-size(): Overlays That Match Their Trigger's Size",{"path":2064,"title":2065},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays","CSS Anchor Positioning and Overlays: Tethering Elements Without JavaScript",{"path":2067,"title":2068},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-attribute-and-css-styling","The popover Attribute: Top-Layer Overlays With No JavaScript",{"path":2070,"title":2071},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-light-dismiss-and-stacking","Popover Light Dismiss, Nesting and Stacking",{"path":2073,"title":2074},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fposition-area-grid-explained","position-area: The Anchor Placement Grid",{"path":2076,"title":2077},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fcontainer-query-polyfill-tradeoffs","Container Query Polyfills: What They Cost and When to Skip Them",{"path":2079,"title":2080},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ffeature-detection-with-supports","Feature Detection with @supports: Syntax, Semantics, and the Traps",{"path":2082,"title":2083},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fhandling-container-query-fallbacks-for-older-browsers","Handling Container Query Fallbacks for Older Browsers",{"path":2085,"title":2086},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks","Container Query Fallbacks: Spec-Compliant CSS Strategies for Legacy Browsers",{"path":2088,"title":2089},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fintrinsic-layout-fallbacks-without-queries","Intrinsic Layout Fallbacks: Baselines That Adapt Without Any Query",{"path":2091,"title":2092},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ftesting-fallbacks-without-old-browsers","Testing CSS Fallbacks Without an Old Browser",{"path":2094,"title":2095},"\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":2097,"title":2098},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-query-range-and-logic-operators","Container Query Range Syntax and Logic Operators",{"path":2100,"title":2101},"\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":2103,"title":2104},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-type-size-vs-inline-size","Choosing container-type: inline-size, size, or normal",{"path":2106,"title":2107},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-vs-media-queries-comparison","Container vs Media Queries: Choosing the Right Reference Box",{"path":2109,"title":2110},"\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":2112,"title":2113},"\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":2115,"title":2116},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics","Container Query Syntax Basics",{"path":2118,"title":2119},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fnesting-and-naming-container-queries","Nesting and Naming Container Queries: Targeting the Right Ancestor",{"path":2121,"title":2122},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fauto-fit-minmax-responsive-grids","Responsive Grids with repeat(auto-fit, minmax())",{"path":2124,"title":2125},"\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":2127,"title":2128},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fgrid-auto-flow-dense-packing","grid-auto-flow: dense for Packed Layouts",{"path":2130,"title":2131},"\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":2133,"title":2134},"\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":2136,"title":2137},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts","CSS Grid and Subgrid Layouts for Responsive Interfaces",{"path":2139,"title":2140},"\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":2142,"title":2143},"\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":2145,"title":2146},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fsubgrid-vs-nested-grid","Subgrid vs an Independently Nested Grid",{"path":2148,"title":2149},"\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":2151,"title":2152},"\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":2154,"title":2155},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-grow-and-flex-shrink-explained","flex-grow and flex-shrink Explained",{"path":2157,"title":2158},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-wrap-intrinsic-responsive-rows","Breakpoint-Free Responsive Rows With flex-wrap and flex-basis",{"path":2160,"title":2161},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflexbox-gap-and-spacing","Flexbox gap vs Margins: Spacing Items Without Edge Hacks",{"path":2163,"title":2164},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns","Flexbox Layout Patterns: One-Dimensional Layout for Real Components",{"path":2166,"title":2167},"\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":2169,"title":2170},"\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":2172,"title":2173},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fdebugging-clamp-values","Debugging clamp(): Values That Are Ignored, Stuck or Never Fluid",{"path":2175,"title":2176},"\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":2178,"title":2179},"\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":2181,"title":2182},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-type-accessibility-and-zoom","Fluid Type, Accessibility and Zoom: The vw-Only Trap",{"path":2184,"title":2185},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-typography-without-javascript","Fluid Typography Without JavaScript: A Precision CSS Reference",{"path":2187,"title":2188},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp","Fluid Typography with clamp(): A Practical Guide for Modern CSS",{"path":2190,"title":2191},"\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":2193,"title":31},"\u002Fmastering-container-queries-responsive-layouts",{"path":2195,"title":2196},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Faspect-ratio-for-responsive-media","Using aspect-ratio for Responsive Media and Preventing Layout Shift",{"path":2198,"title":2199},"\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":2201,"title":2202},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques","Intrinsic Sizing Techniques: Modern CSS Layouts for Responsive UI",{"path":2204,"title":2205},"\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":2207,"title":2208},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fmin-max-fit-content-explained","min-content, max-content, and fit-content() Explained",{"path":2210,"title":2211},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fobject-fit-and-object-position","object-fit and object-position: Images That Fit Any Box",{"path":2213,"title":2214},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fpreventing-flex-and-grid-overflow","The min-width: auto Trap in Flex and Grid Layouts",{"path":2216,"title":2217},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-for-reset-and-tokens","Cascade Layers for Reset and Design Tokens",{"path":2219,"title":2220},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-vs-specificity-hacks","Cascade Layers vs Specificity Hacks: Ordering Instead of Escalating",{"path":2222,"title":2223},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcss-scope-for-component-styles","@scope for Component Styles: Short Selectors That Cannot Leak",{"path":2225,"title":2226},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies","Modern CSS Reset Strategies: A Spec-Compliant Foundation",{"path":2228,"title":2229},"\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":2231,"title":2232},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fwriting-a-minimal-modern-reset","Writing a Minimal Modern CSS Reset: Every Line Justified",{"path":2234,"title":2235},"\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":2237,"title":2238},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fempty-and-loading-states-with-has","Empty and Loading States With ()",{"path":2240,"title":2241},"\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":2243,"title":2244},"\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":2246,"title":2247},"\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":2249,"title":2250},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has","Parent-Aware Layouts With :has(): Letting Containers React to Their Contents",{"path":2252,"title":2253},"\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":2255,"title":2256},"\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":2258,"title":2259},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-data-tables","Container Query Data Tables: Reflowing Tables to Cards",{"path":2261,"title":2262},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-sidebar-layouts","Container Query Sidebar Layouts That Travel Between Contexts",{"path":2264,"title":2265},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns","Responsive Component Patterns: Architecture & Implementation",{"path":2267,"title":2268},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-forms-with-container-queries","Responsive Forms with Container Queries: Reflow Without Losing the Wiring",{"path":2270,"title":2271},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-hero-sections-with-container-queries","Responsive Hero Sections With Container Queries",{"path":2273,"title":2274},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-navigation-without-media-queries","Responsive Navigation Without Media Queries Using Container Queries",{"path":2276,"title":2277},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-pricing-tables","Responsive Pricing Tables: Aligned Features, a Clear Recommendation, Any Width",{"path":2279,"title":2280},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Ftabs-that-become-accordions","Tabs That Become an Accordion: One Component, Two Layouts",{"path":2282,"title":2283},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fcss-only-carousel-with-scroll-snap","A CSS-Only Carousel With Scroll Snap",{"path":1768,"title":5},{"path":2286,"title":2287},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts","Scroll Snap & Overflow Layouts: Designing Components That Scroll on Purpose",{"path":2289,"title":2290},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Foverscroll-behavior-for-nested-scrolling","overscroll-behavior: Taming Nested Scrolling, Pull-to-Refresh and Back-Swipe",{"path":2292,"title":2293},"\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":2295,"title":2296},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fcombining-size-and-style-queries","Combining Size and Style Container Queries",{"path":2298,"title":2299},"\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":2301,"title":2302},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state","Style Queries and Container State: Token-Driven Component Variants",{"path":2304,"title":2305},"\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":2307,"title":2308},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fstyle-query-component-variants","Component Variants With Style Queries: One Token, Many Looks",{"path":2310,"title":2311},"\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":2313,"title":2314},"\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":2316,"title":2317},"\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":2319,"title":2320},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout","Viewport Units & Mobile Layout: Designing for the Screen You Actually Get",{"path":2322,"title":2323},"\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":2325,"title":2326},"\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":2328,"title":2329},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Fvirtual-keyboard-and-interactive-widget","Layouts That Survive the Virtual Keyboard",{"title":2331,"caption":2332,"height":2333,"resizable":252,"html":2334,"css":2335},"Card row that scrolls when narrow and wraps when wide","At this width the row scrolls sideways with gentle snapping; drag the frame wider than about 44rem and it becomes a wrapping grid.",330,"\n\u003Csection class=\"shelf\" aria-labelledby=\"shelf-title\">\n  \u003Ch2 id=\"shelf-title\">More from this author\u003C\u002Fh2>\n  \u003Cdiv class=\"row\" tabindex=\"0\" role=\"group\" aria-label=\"More from this author\">\n    \u003Carticle class=\"card\">\u003Cdiv class=\"card__thumb\">\u003C\u002Fdiv>\u003Ch3>Night Trains\u003C\u002Fh3>\u003C\u002Farticle>\n    \u003Carticle class=\"card\">\u003Cdiv class=\"card__thumb\">\u003C\u002Fdiv>\u003Ch3>Harbour Lights\u003C\u002Fh3>\u003C\u002Farticle>\n    \u003Carticle class=\"card\">\u003Cdiv class=\"card__thumb\">\u003C\u002Fdiv>\u003Ch3>The Salt Road\u003C\u002Fh3>\u003C\u002Farticle>\n    \u003Carticle class=\"card\">\u003Cdiv class=\"card__thumb\">\u003C\u002Fdiv>\u003Ch3>Winter Orchard\u003C\u002Fh3>\u003C\u002Farticle>\n    \u003Carticle class=\"card\">\u003Cdiv class=\"card__thumb\">\u003C\u002Fdiv>\u003Ch3>Signal Hill\u003C\u002Fh3>\u003C\u002Farticle>\n  \u003C\u002Fdiv>\n\u003C\u002Fsection>","\n.shelf { container-type: inline-size; }\n.shelf h2 { font-size: 1.05rem; margin: 0 0 0.5rem; }\n.row {\n  display: grid;\n  grid-auto-flow: column;\n  grid-auto-columns: 11rem;\n  gap: 0.75rem;\n  overflow-x: auto;\n  overscroll-behavior-inline: contain;\n  scroll-snap-type: inline proximity;\n  scroll-padding-inline: 0.25rem;\n  padding: 0.25rem 0.25rem 0.75rem;\n  scrollbar-width: thin;\n  scrollbar-color: var(--demo-muted) transparent;\n}\n.row:focus-visible { outline: 2px solid var(--demo-accent); outline-offset: 2px; }\n.card { scroll-snap-align: start; padding: 0.75rem; border: 1px solid var(--demo-border); border-radius: 10px; background: var(--demo-surface); }\n.card__thumb { aspect-ratio: 4 \u002F 3; border-radius: 6px; background: linear-gradient(135deg, #e0e7ff, #a5b4fc); }\n.card h3 { font-size: 0.95rem; margin: 0.5rem 0 0; }\n@container (width > 44rem) {\n  .row {\n    grid-auto-flow: row;\n    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));\n    overflow-x: visible;\n    scroll-snap-type: none;\n  }\n}",1789717746449]