[{"data":1,"prerenderedAt":1975},["ShallowReactive",2],{"page-\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ftesting-fallbacks-without-old-browsers":3,"content-all-pages":1411,"live-demo:cq-force-fallback":1969},{"id":4,"title":5,"body":6,"description":1393,"extension":1394,"meta":1395,"navigation":504,"path":1407,"seo":1408,"stem":1409,"__hash__":1410},"content\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ftesting-fallbacks-without-old-browsers\u002Findex.md","Testing CSS Fallbacks Without an Old Browser",{"type":7,"value":8,"toc":1382},"minimark",[9,13,28,33,36,64,67,161,165,175,1076,1095,1098,1102,1106,1109,1173,1181,1185,1188,1222,1234,1238,1241,1253,1263,1269,1275,1279,1290,1294,1303,1307,1316,1322,1328,1347,1351,1379],[10,11,5],"h1",{"id":12},"testing-css-fallbacks-without-an-old-browser",[14,15,16,17,22,23,27],"p",{},"Every progressive-enhancement stylesheet has two layouts: the enhanced one that developers see every day, and the fallback that only older browsers render. The fallback is written once, looks fine on the day it ships, and then quietly decays as shared tokens change, markup evolves and nobody opens it again. The narrow problem this page solves is making the fallback path visible and testable in a modern browser — forcing the unsupported branch on demand, emulating the media features that matter, and automating screenshots so both paths are checked on every change. It belongs to ",[18,19,21],"a",{"href":20},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002F","Container Query Fallbacks"," in the ",[18,24,26],{"href":25},"\u002Fmastering-container-queries-responsive-layouts\u002F","Mastering Container Queries & Responsive Layouts"," guide.",[29,30,32],"h2",{"id":31},"why-fallbacks-rot","Why fallbacks rot",[14,34,35],{},"A fallback is code with no daily user among the people who maintain it. The enhanced path is exercised constantly — every developer's browser renders it, every design review looks at it. The fallback is exercised only by the small share of the audience on older browsers, and bugs there are reported rarely, if ever. Three kinds of change break it silently:",[37,38,39,47,58],"ul",{},[40,41,42,46],"li",{},[43,44,45],"strong",{},"Shared changes."," A token rename, a new wrapper element or a changed class name updates the enhanced rules and misses the fallback rules that referenced the old names.",[40,48,49,52,53,57],{},[43,50,51],{},"Enhancement creep."," A new feature is added inside an ",[54,55,56],"code",{},"@supports"," block because it only makes sense there, but the component now depends on it for something basic, such as a visible close button.",[40,59,60,63],{},[43,61,62],{},"Assumption drift."," The fallback was designed for the component's placements at the time; a new placement in a narrow sidebar makes the viewport-based fallback wrong there, and nobody notices.",[14,65,66],{},"The cure is to make the fallback as visible as the enhancement: render it deliberately, in the same browser, during development and in CI.",[68,69,75,76,75,80,75,84,75,92,75,104,75,109,75,115,75,119,75,126,75,131,75,136,75,143,75,146,75,149,75,154,75,158],"svg",{"viewBox":70,"role":71,"ariaLabel":72,"xmlns":73,"style":74},"0 0 720 300","img","Two render paths from one stylesheet: the enhanced path seen daily and the fallback path usually unseen; forcing the fallback branch makes both visible for tests","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","width:100%;height:auto;max-width:720px;margin:2rem 0","\n  ",[77,78,79],"title",{},"Making the invisible path visible",[81,82,83],"desc",{},"A stylesheet splits into an enhanced path, rendered by every developer's browser, and a fallback path, rendered only by old browsers. A force switch routes a modern browser down the fallback path so screenshot tests can capture it.",[85,86,91],"text",{"textAnchor":87,"x":88,"y":89,"style":90},"middle","360","26","text-anchor:middle;fill:currentColor;font:700 17px sans-serif","One stylesheet, two paths, one of them unseen",[93,94],"rect",{"x":95,"y":96,"width":97,"height":98,"rx":99,"fill":100,"stroke":101,"strokeWidth":102,"opacity":103},"270","46","180","48","10","none","currentColor","1.5","0.6",[85,105,108],{"textAnchor":87,"x":88,"y":106,"style":107},"75","text-anchor:middle;fill:currentColor;font:600 13px sans-serif","stylesheet",[110,111],"line",{"x1":112,"y1":113,"x2":97,"y2":114,"stroke":101,"strokeWidth":102,"opacity":103},"320","94","140",[110,116],{"x1":117,"y1":113,"x2":118,"y2":114,"stroke":101,"strokeWidth":102,"opacity":103},"400","540",[93,120],{"x":121,"y":114,"width":122,"height":123,"rx":99,"fill":124,"opacity":125},"60","240","70","#7aa2ff","0.34",[85,127,130],{"textAnchor":87,"x":97,"y":128,"style":129},"168","text-anchor:middle;fill:currentColor;font:700 13px sans-serif","enhanced path",[85,132,135],{"textAnchor":87,"x":97,"y":133,"style":134},"190","text-anchor:middle;fill:currentColor;font:12px sans-serif","seen every day",[93,137],{"x":138,"y":114,"width":122,"height":123,"rx":99,"fill":100,"stroke":101,"strokeWidth":102,"strokeDashArray":139,"opacity":142},"420",[140,141],"6","4","0.7",[85,144,145],{"textAnchor":87,"x":118,"y":128,"style":129},"fallback path",[85,147,148],{"textAnchor":87,"x":118,"y":133,"style":134},"seen by old browsers only",[93,150],{"x":138,"y":151,"width":122,"height":152,"rx":99,"fill":124,"opacity":153},"232","44","0.2",[85,155,157],{"textAnchor":87,"x":118,"y":156,"style":134},"259","force switch → screenshots",[110,159],{"x1":118,"y1":160,"x2":118,"y2":151,"stroke":101,"strokeWidth":102,"opacity":103},"210",[29,162,164],{"id":163},"the-complete-implementation-a-force-switch","The complete implementation: a force switch",[14,166,167,168,170,171,174],{},"The simplest reliable technique gates every enhancement behind a condition that the test harness can defeat. Here the stylesheet puts all container-query enhancements under ",[54,169,56],{},", and additionally under an attribute selector that is absent in normal use. Adding ",[54,172,173],{},"data-force-fallback"," to the root makes the enhanced branch unreachable, so a modern browser renders exactly what an old one would.",[176,177,182],"pre",{"className":178,"code":179,"language":180,"meta":181,"style":181},"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>Forcing the fallback path\u003C\u002Ftitle>\n\u003Cscript>\n  \u002F\u002F Development and CI only: ?fallback=1 forces the baseline rendering.\n  if (new URLSearchParams(location.search).has('fallback')) {\n    document.documentElement.setAttribute('data-force-fallback', '');\n  }\n\u003C\u002Fscript>\n\u003Cstyle>\n  \u002F* ---------- Baseline (every browser, and forced mode) ---------- *\u002F\n  .gallery {\n    display: grid;\n    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));\n    gap: 1rem;\n  }\n  .gallery__caption { font-size: 0.9rem; }\n\n  \u002F* ---------- Enhancement ---------- *\u002F\n  .gallery-slot { container-type: inline-size; }\n\n  @supports (container-type: inline-size) {\n    \u002F* :not([data-force-fallback]) makes the whole block unreachable\n       when the switch is on, exactly like an unsupporting engine. *\u002F\n    :root:not([data-force-fallback]) {\n      @container (width > 50rem) {\n        .gallery { grid-template-columns: 2fr 1fr 1fr; }\n        .gallery > :first-child { grid-row: span 2; }\n        .gallery__caption { font-size: 1rem; }\n      }\n    }\n  }\n\n  \u002F* A visible marker so nobody mistakes forced mode for a bug. *\u002F\n  [data-force-fallback] body::before {\n    content: \"Fallback mode\";\n    position: fixed;\n    inset: auto 0.5rem 0.5rem auto;\n    padding: 0.2rem 0.5rem;\n    background: #fef3c7;\n    color: #78350f;\n    font: 12px\u002F1.4 ui-monospace, monospace;\n  }\n\u003C\u002Fstyle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cdiv class=\"gallery-slot\">\n    \u003Cdiv class=\"gallery\">\n      \u003Cfigure>\u003Cdiv class=\"thumb\">\u003C\u002Fdiv>\u003Cfigcaption class=\"gallery__caption\">Harbour\u003C\u002Ffigcaption>\u003C\u002Ffigure>\n      \u003Cfigure>\u003Cdiv class=\"thumb\">\u003C\u002Fdiv>\u003Cfigcaption class=\"gallery__caption\">Ridge\u003C\u002Ffigcaption>\u003C\u002Ffigure>\n      \u003Cfigure>\u003Cdiv class=\"thumb\">\u003C\u002Fdiv>\u003Cfigcaption class=\"gallery__caption\">Orchard\u003C\u002Ffigcaption>\u003C\u002Ffigure>\n    \u003C\u002Fdiv>\n  \u003C\u002Fdiv>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n","html","",[54,183,184,203,223,233,251,276,290,300,307,339,362,368,378,388,394,403,418,458,472,477,499,506,512,526,531,544,550,556,570,592,624,648,666,672,678,683,688,694,713,726,739,764,782,795,808,837,842,851,860,869,888,905,954,996,1038,1048,1058,1067],{"__ignoreMap":181},[185,186,188,192,196,200],"span",{"class":110,"line":187},1,[185,189,191],{"class":190},"suds8","\u003C!",[185,193,195],{"class":194},"sne4z","doctype",[185,197,199],{"class":198},"s-5SL"," html",[185,201,202],{"class":190},">\n",[185,204,206,209,211,214,217,221],{"class":110,"line":205},2,[185,207,208],{"class":190},"\u003C",[185,210,180],{"class":194},[185,212,213],{"class":198}," lang",[185,215,216],{"class":190},"=",[185,218,220],{"class":219},"sT6z2","\"en\"",[185,222,202],{"class":190},[185,224,226,228,231],{"class":110,"line":225},3,[185,227,208],{"class":190},[185,229,230],{"class":194},"head",[185,232,202],{"class":190},[185,234,236,238,241,244,246,249],{"class":110,"line":235},4,[185,237,208],{"class":190},[185,239,240],{"class":194},"meta",[185,242,243],{"class":198}," charset",[185,245,216],{"class":190},[185,247,248],{"class":219},"\"utf-8\"",[185,250,202],{"class":190},[185,252,254,256,258,261,263,266,269,271,274],{"class":110,"line":253},5,[185,255,208],{"class":190},[185,257,240],{"class":194},[185,259,260],{"class":198}," name",[185,262,216],{"class":190},[185,264,265],{"class":219},"\"viewport\"",[185,267,268],{"class":198}," content",[185,270,216],{"class":190},[185,272,273],{"class":219},"\"width=device-width, initial-scale=1\"",[185,275,202],{"class":190},[185,277,279,281,283,286,288],{"class":110,"line":278},6,[185,280,208],{"class":190},[185,282,77],{"class":194},[185,284,285],{"class":190},">Forcing the fallback path\u003C\u002F",[185,287,77],{"class":194},[185,289,202],{"class":190},[185,291,293,295,298],{"class":110,"line":292},7,[185,294,208],{"class":190},[185,296,297],{"class":194},"script",[185,299,202],{"class":190},[185,301,303],{"class":110,"line":302},8,[185,304,306],{"class":305},"sLBg1","  \u002F\u002F Development and CI only: ?fallback=1 forces the baseline rendering.\n",[185,308,310,314,317,320,324,327,330,333,336],{"class":110,"line":309},9,[185,311,313],{"class":312},"sHUrx","  if",[185,315,316],{"class":190}," (",[185,318,319],{"class":312},"new",[185,321,323],{"class":322},"sKwhi"," URLSearchParams",[185,325,326],{"class":190},"(location.search).",[185,328,329],{"class":322},"has",[185,331,332],{"class":190},"(",[185,334,335],{"class":219},"'fallback'",[185,337,338],{"class":190},")) {\n",[185,340,342,345,348,350,353,356,359],{"class":110,"line":341},10,[185,343,344],{"class":190},"    document.documentElement.",[185,346,347],{"class":322},"setAttribute",[185,349,332],{"class":190},[185,351,352],{"class":219},"'data-force-fallback'",[185,354,355],{"class":190},", ",[185,357,358],{"class":219},"''",[185,360,361],{"class":190},");\n",[185,363,365],{"class":110,"line":364},11,[185,366,367],{"class":190},"  }\n",[185,369,371,374,376],{"class":110,"line":370},12,[185,372,373],{"class":190},"\u003C\u002F",[185,375,297],{"class":194},[185,377,202],{"class":190},[185,379,381,383,386],{"class":110,"line":380},13,[185,382,208],{"class":190},[185,384,385],{"class":194},"style",[185,387,202],{"class":190},[185,389,391],{"class":110,"line":390},14,[185,392,393],{"class":305},"  \u002F* ---------- Baseline (every browser, and forced mode) ---------- *\u002F\n",[185,395,397,400],{"class":110,"line":396},15,[185,398,399],{"class":198},"  .gallery",[185,401,402],{"class":190}," {\n",[185,404,406,409,412,415],{"class":110,"line":405},16,[185,407,408],{"class":198},"    display",[185,410,411],{"class":190},": ",[185,413,414],{"class":198},"grid",[185,416,417],{"class":190},";\n",[185,419,421,424,426,429,431,434,436,439,441,444,447,449,452,455],{"class":110,"line":420},17,[185,422,423],{"class":198},"    grid-template-columns",[185,425,411],{"class":190},[185,427,428],{"class":198},"repeat",[185,430,332],{"class":190},[185,432,433],{"class":198},"auto-fit",[185,435,355],{"class":190},[185,437,438],{"class":198},"minmax",[185,440,332],{"class":190},[185,442,443],{"class":198},"12",[185,445,446],{"class":312},"rem",[185,448,355],{"class":190},[185,450,451],{"class":198},"1",[185,453,454],{"class":312},"fr",[185,456,457],{"class":190},"));\n",[185,459,461,464,466,468,470],{"class":110,"line":460},18,[185,462,463],{"class":198},"    gap",[185,465,411],{"class":190},[185,467,451],{"class":198},[185,469,446],{"class":312},[185,471,417],{"class":190},[185,473,475],{"class":110,"line":474},19,[185,476,367],{"class":190},[185,478,480,483,486,489,491,494,496],{"class":110,"line":479},20,[185,481,482],{"class":198},"  .gallery__caption",[185,484,485],{"class":190}," { ",[185,487,488],{"class":198},"font-size",[185,490,411],{"class":190},[185,492,493],{"class":198},"0.9",[185,495,446],{"class":312},[185,497,498],{"class":190},"; }\n",[185,500,502],{"class":110,"line":501},21,[185,503,505],{"emptyLinePlaceholder":504},true,"\n",[185,507,509],{"class":110,"line":508},22,[185,510,511],{"class":305},"  \u002F* ---------- Enhancement ---------- *\u002F\n",[185,513,515,518,520,523],{"class":110,"line":514},23,[185,516,517],{"class":198},"  .gallery-slot",[185,519,485],{"class":190},[185,521,522],{"class":198},"container-type",[185,524,525],{"class":190},": inline-size; }\n",[185,527,529],{"class":110,"line":528},24,[185,530,505],{"emptyLinePlaceholder":504},[185,532,534,537,539,541],{"class":110,"line":533},25,[185,535,536],{"class":312},"  @supports",[185,538,316],{"class":190},[185,540,522],{"class":198},[185,542,543],{"class":190},": inline-size) {\n",[185,545,547],{"class":110,"line":546},26,[185,548,549],{"class":305},"    \u002F* :not([data-force-fallback]) makes the whole block unreachable\n",[185,551,553],{"class":110,"line":552},27,[185,554,555],{"class":305},"       when the switch is on, exactly like an unsupporting engine. *\u002F\n",[185,557,559,562,565,567],{"class":110,"line":558},28,[185,560,561],{"class":198},"    :root:not",[185,563,564],{"class":190},"([",[185,566,173],{"class":198},[185,568,569],{"class":190},"]) {\n",[185,571,573,576,579,581,584,587,589],{"class":110,"line":572},29,[185,574,575],{"class":190},"      @",[185,577,578],{"class":198},"container",[185,580,316],{"class":190},[185,582,583],{"class":198},"width",[185,585,586],{"class":190}," > 50",[185,588,446],{"class":198},[185,590,591],{"class":190},") {\n",[185,593,595,598,601,603,606,608,611,613,616,618,620,622],{"class":110,"line":594},30,[185,596,597],{"class":190},"        .",[185,599,600],{"class":198},"gallery",[185,602,485],{"class":190},[185,604,605],{"class":198},"grid-template-columns",[185,607,411],{"class":190},[185,609,610],{"class":198},"2",[185,612,454],{"class":312},[185,614,615],{"class":198}," 1",[185,617,454],{"class":312},[185,619,615],{"class":198},[185,621,454],{"class":312},[185,623,498],{"class":190},[185,625,627,630,633,636,638,641,644,646],{"class":110,"line":626},31,[185,628,629],{"class":198},"        .gallery",[185,631,632],{"class":312}," >",[185,634,635],{"class":198}," :first-child",[185,637,485],{"class":190},[185,639,640],{"class":198},"grid-row",[185,642,643],{"class":190},": span ",[185,645,610],{"class":198},[185,647,498],{"class":190},[185,649,651,654,656,658,660,662,664],{"class":110,"line":650},32,[185,652,653],{"class":198},"        .gallery__caption",[185,655,485],{"class":190},[185,657,488],{"class":198},[185,659,411],{"class":190},[185,661,451],{"class":198},[185,663,446],{"class":312},[185,665,498],{"class":190},[185,667,669],{"class":110,"line":668},33,[185,670,671],{"class":190},"      }\n",[185,673,675],{"class":110,"line":674},34,[185,676,677],{"class":190},"    }\n",[185,679,681],{"class":110,"line":680},35,[185,682,367],{"class":190},[185,684,686],{"class":110,"line":685},36,[185,687,505],{"emptyLinePlaceholder":504},[185,689,691],{"class":110,"line":690},37,[185,692,693],{"class":305},"  \u002F* A visible marker so nobody mistakes forced mode for a bug. *\u002F\n",[185,695,697,700,702,705,708,711],{"class":110,"line":696},38,[185,698,699],{"class":190},"  [",[185,701,173],{"class":198},[185,703,704],{"class":190},"] ",[185,706,707],{"class":194},"body",[185,709,710],{"class":198},"::before",[185,712,402],{"class":190},[185,714,716,719,721,724],{"class":110,"line":715},39,[185,717,718],{"class":198},"    content",[185,720,411],{"class":190},[185,722,723],{"class":219},"\"Fallback mode\"",[185,725,417],{"class":190},[185,727,729,732,734,737],{"class":110,"line":728},40,[185,730,731],{"class":198},"    position",[185,733,411],{"class":190},[185,735,736],{"class":198},"fixed",[185,738,417],{"class":190},[185,740,742,745,747,750,753,755,757,759,762],{"class":110,"line":741},41,[185,743,744],{"class":198},"    inset",[185,746,411],{"class":190},[185,748,749],{"class":198},"auto",[185,751,752],{"class":198}," 0.5",[185,754,446],{"class":312},[185,756,752],{"class":198},[185,758,446],{"class":312},[185,760,761],{"class":198}," auto",[185,763,417],{"class":190},[185,765,767,770,772,774,776,778,780],{"class":110,"line":766},42,[185,768,769],{"class":198},"    padding",[185,771,411],{"class":190},[185,773,153],{"class":198},[185,775,446],{"class":312},[185,777,752],{"class":198},[185,779,446],{"class":312},[185,781,417],{"class":190},[185,783,785,788,790,793],{"class":110,"line":784},43,[185,786,787],{"class":198},"    background",[185,789,411],{"class":190},[185,791,792],{"class":198},"#fef3c7",[185,794,417],{"class":190},[185,796,798,801,803,806],{"class":110,"line":797},44,[185,799,800],{"class":198},"    color",[185,802,411],{"class":190},[185,804,805],{"class":198},"#78350f",[185,807,417],{"class":190},[185,809,811,814,816,818,821,824,827,830,832,835],{"class":110,"line":810},45,[185,812,813],{"class":198},"    font",[185,815,411],{"class":190},[185,817,443],{"class":198},[185,819,820],{"class":312},"px",[185,822,823],{"class":190},"\u002F",[185,825,826],{"class":198},"1.4",[185,828,829],{"class":198}," ui-monospace",[185,831,355],{"class":190},[185,833,834],{"class":198},"monospace",[185,836,417],{"class":190},[185,838,840],{"class":110,"line":839},46,[185,841,367],{"class":190},[185,843,845,847,849],{"class":110,"line":844},47,[185,846,373],{"class":190},[185,848,385],{"class":194},[185,850,202],{"class":190},[185,852,854,856,858],{"class":110,"line":853},48,[185,855,373],{"class":190},[185,857,230],{"class":194},[185,859,202],{"class":190},[185,861,863,865,867],{"class":110,"line":862},49,[185,864,208],{"class":190},[185,866,707],{"class":194},[185,868,202],{"class":190},[185,870,872,875,878,881,883,886],{"class":110,"line":871},50,[185,873,874],{"class":190},"  \u003C",[185,876,877],{"class":194},"div",[185,879,880],{"class":198}," class",[185,882,216],{"class":190},[185,884,885],{"class":219},"\"gallery-slot\"",[185,887,202],{"class":190},[185,889,891,894,896,898,900,903],{"class":110,"line":890},51,[185,892,893],{"class":190},"    \u003C",[185,895,877],{"class":194},[185,897,880],{"class":198},[185,899,216],{"class":190},[185,901,902],{"class":219},"\"gallery\"",[185,904,202],{"class":190},[185,906,908,911,914,917,919,921,923,926,929,931,933,936,938,940,943,946,948,950,952],{"class":110,"line":907},52,[185,909,910],{"class":190},"      \u003C",[185,912,913],{"class":194},"figure",[185,915,916],{"class":190},">\u003C",[185,918,877],{"class":194},[185,920,880],{"class":198},[185,922,216],{"class":190},[185,924,925],{"class":219},"\"thumb\"",[185,927,928],{"class":190},">\u003C\u002F",[185,930,877],{"class":194},[185,932,916],{"class":190},[185,934,935],{"class":194},"figcaption",[185,937,880],{"class":198},[185,939,216],{"class":190},[185,941,942],{"class":219},"\"gallery__caption\"",[185,944,945],{"class":190},">Harbour\u003C\u002F",[185,947,935],{"class":194},[185,949,928],{"class":190},[185,951,913],{"class":194},[185,953,202],{"class":190},[185,955,957,959,961,963,965,967,969,971,973,975,977,979,981,983,985,988,990,992,994],{"class":110,"line":956},53,[185,958,910],{"class":190},[185,960,913],{"class":194},[185,962,916],{"class":190},[185,964,877],{"class":194},[185,966,880],{"class":198},[185,968,216],{"class":190},[185,970,925],{"class":219},[185,972,928],{"class":190},[185,974,877],{"class":194},[185,976,916],{"class":190},[185,978,935],{"class":194},[185,980,880],{"class":198},[185,982,216],{"class":190},[185,984,942],{"class":219},[185,986,987],{"class":190},">Ridge\u003C\u002F",[185,989,935],{"class":194},[185,991,928],{"class":190},[185,993,913],{"class":194},[185,995,202],{"class":190},[185,997,999,1001,1003,1005,1007,1009,1011,1013,1015,1017,1019,1021,1023,1025,1027,1030,1032,1034,1036],{"class":110,"line":998},54,[185,1000,910],{"class":190},[185,1002,913],{"class":194},[185,1004,916],{"class":190},[185,1006,877],{"class":194},[185,1008,880],{"class":198},[185,1010,216],{"class":190},[185,1012,925],{"class":219},[185,1014,928],{"class":190},[185,1016,877],{"class":194},[185,1018,916],{"class":190},[185,1020,935],{"class":194},[185,1022,880],{"class":198},[185,1024,216],{"class":190},[185,1026,942],{"class":219},[185,1028,1029],{"class":190},">Orchard\u003C\u002F",[185,1031,935],{"class":194},[185,1033,928],{"class":190},[185,1035,913],{"class":194},[185,1037,202],{"class":190},[185,1039,1041,1044,1046],{"class":110,"line":1040},55,[185,1042,1043],{"class":190},"    \u003C\u002F",[185,1045,877],{"class":194},[185,1047,202],{"class":190},[185,1049,1051,1054,1056],{"class":110,"line":1050},56,[185,1052,1053],{"class":190},"  \u003C\u002F",[185,1055,877],{"class":194},[185,1057,202],{"class":190},[185,1059,1061,1063,1065],{"class":110,"line":1060},57,[185,1062,373],{"class":190},[185,1064,707],{"class":194},[185,1066,202],{"class":190},[185,1068,1070,1072,1074],{"class":110,"line":1069},58,[185,1071,373],{"class":190},[185,1073,180],{"class":194},[185,1075,202],{"class":190},[14,1077,1078,1079,1082,1083,1086,1087,1091,1092,1094],{},"Nesting the ",[54,1080,1081],{},"@container"," rule inside ",[54,1084,1085],{},":root:not([data-force-fallback])"," relies on CSS nesting, covered in ",[18,1088,1090],{"href":1089},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-queries-inside-css-nesting\u002F","Container Queries Inside CSS Nesting",". Where nesting is not available in the build, the equivalent flat form prefixes each enhanced selector with ",[54,1093,1085],{},". Either way, the switch is a single attribute, easy to toggle from a URL parameter, a bookmarklet, or a test runner.",[14,1096,1097],{},"The demo applies the same idea to a single component. The checkbox plays the role of the force switch: ticking it makes the enhanced container-query block unreachable, and the card falls back to its intrinsic baseline while the frame stays the same width.",[1099,1100],"live-demo",{"name":1101},"cq-force-fallback",[29,1103,1105],{"id":1104},"the-key-technique-test-both-paths-automatically","The key technique: test both paths automatically",[14,1107,1108],{},"Manual spot checks catch the obvious; automated screenshots catch drift. The pattern is the same for any visual regression tool: render each important page twice, once normally and once with the force switch, at a few representative viewport sizes, and compare against stored baselines.",[68,1110,75,1113,75,1116,75,1119,75,1122,75,1126,75,1131,75,1135,75,1139,75,1144,75,1149,75,1151,75,1154,75,1158,75,1163,75,1166,75,1169],{"viewBox":1111,"role":71,"ariaLabel":1112,"xmlns":73,"style":74},"0 0 720 290","Test matrix of pages by viewport width by path, producing screenshot comparisons for enhanced and forced-fallback renders",[77,1114,1115],{},"A small screenshot matrix covers both paths",[81,1117,1118],{},"For each key page, three widths — 360, 768 and 1280 pixels — are rendered on the enhanced path and on the forced-fallback path, giving six screenshots per page that are compared with approved baselines.",[85,1120,1121],{"textAnchor":87,"x":88,"y":89,"style":90},"Pages × widths × paths",[85,1123,1125],{"textAnchor":87,"x":114,"y":123,"style":1124},"text-anchor:middle;fill:currentColor;font:600 12px sans-serif","path",[85,1127,1130],{"textAnchor":87,"x":1128,"y":123,"style":1129},"300","text-anchor:middle;fill:currentColor;font:600 12px ui-monospace,monospace","360px",[85,1132,1134],{"textAnchor":87,"x":1133,"y":123,"style":1129},"460","768px",[85,1136,1138],{"textAnchor":87,"x":1137,"y":123,"style":1129},"620","1280px",[85,1140,1143],{"textAnchor":87,"x":114,"y":1141,"style":1142},"118","text-anchor:middle;fill:currentColor;font:13px sans-serif","enhanced",[93,1145],{"x":122,"y":1146,"width":1147,"height":1148,"rx":140,"fill":124,"opacity":125},"90","120","50",[93,1150],{"x":117,"y":1146,"width":1147,"height":1148,"rx":140,"fill":124,"opacity":125},[93,1152],{"x":1153,"y":1146,"width":1147,"height":1148,"rx":140,"fill":124,"opacity":125},"560",[85,1155,1157],{"textAnchor":87,"x":114,"y":1156,"style":1142},"188","?fallback=1",[93,1159],{"x":122,"y":1160,"width":1147,"height":1148,"rx":140,"fill":100,"stroke":101,"strokeWidth":102,"strokeDashArray":1161,"opacity":142},"160",[1162,141],"5",[93,1164],{"x":117,"y":1160,"width":1147,"height":1148,"rx":140,"fill":100,"stroke":101,"strokeWidth":102,"strokeDashArray":1165,"opacity":142},[1162,141],[93,1167],{"x":1153,"y":1160,"width":1147,"height":1148,"rx":140,"fill":100,"stroke":101,"strokeWidth":102,"strokeDashArray":1168,"opacity":142},[1162,141],[85,1170,1172],{"textAnchor":87,"x":88,"y":1171,"style":134},"252","Six screenshots per key page catch most regressions on either path.",[14,1174,1175,1176,1180],{},"The fallback screenshots have a slightly different purpose from the enhanced ones. They are not checking that the fallback looks polished — it is allowed to be plainer — but that it remains ",[1177,1178,1179],"em",{},"usable",": nothing overflows, nothing overlaps, every control is visible, and text is readable. Reviewers approving fallback baselines should judge against that standard, not against the enhanced design.",[29,1182,1184],{"id":1183},"emulating-the-media-features-that-matter","Emulating the media features that matter",[14,1186,1187],{},"Container-query support is not the only branch in a modern stylesheet. Motion, contrast and colour preferences create further paths that are just as rarely seen. DevTools can emulate these directly, so they belong in the same routine:",[37,1189,1190,1198,1206,1214],{},[40,1191,1192,1197],{},[43,1193,1194],{},[54,1195,1196],{},"prefers-reduced-motion: reduce"," — confirms every animation has a still or near-still alternative. Chromium's Rendering drawer and Firefox's accessibility settings both provide the toggle.",[40,1199,1200,1205],{},[43,1201,1202],{},[54,1203,1204],{},"forced-colors: active"," — confirms that states and focus indicators survive when author colours are replaced. Chromium can emulate it; Windows High Contrast is the real-world case.",[40,1207,1208,1213],{},[43,1209,1210],{},[54,1211,1212],{},"prefers-color-scheme: dark"," — confirms the dark theme covers every component.",[40,1215,1216,1221],{},[43,1217,1218],{},[54,1219,1220],{},"prefers-contrast: more"," — confirms high-contrast tokens are applied where defined.",[14,1223,1224,1225,1228,1229,1233],{},"A single test run can iterate over these emulations as it does over widths. The reduced-motion path in particular is worth a screenshot at the ",[1177,1226,1227],{},"end"," state of entrance animations, since a common bug is content left at its animation start state — invisible — when the animation is removed. That failure mode is covered in ",[18,1230,1232],{"href":1231},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fprefers-reduced-motion-recipes\u002F","prefers-reduced-motion Recipes",".",[29,1235,1237],{"id":1236},"writing-fallbacks-that-are-easy-to-test","Writing fallbacks that are easy to test",[14,1239,1240],{},"Some fallback structures are much easier to force and verify than others, and it is worth choosing them deliberately.",[14,1242,1243,1246,1247,1249,1250,1252],{},[43,1244,1245],{},"One gate per component, not per rule."," A component whose enhancements all sit inside a single ",[54,1248,56],{}," block can be forced with one switch and reviewed in one place. Enhancements scattered across many small ",[54,1251,56],{}," blocks, each with slightly different conditions, produce combinations nobody tests — a browser that supports one condition but not another renders a hybrid that neither path's screenshots show.",[14,1254,1255,1258,1259,1262],{},[43,1256,1257],{},"Enhancements that only add."," If every rule in the enhanced block refines something the baseline already made usable, the forced fallback is simply \"the same component, plainer\", and review is quick. If enhanced rules also ",[1177,1260,1261],{},"remove"," things the baseline added — hiding a fallback button, undoing a fallback margin — the two paths diverge in ways that are easy to get wrong. Prefer designs where the baseline has nothing that must be undone.",[14,1264,1265,1268],{},[43,1266,1267],{},"Named breakpoints in both paths."," When a fallback uses viewport media queries to approximate container behaviour, document which container thresholds each viewport query stands in for. Then a change to a container threshold prompts a review of its viewport stand-in, instead of the two drifting apart.",[14,1270,1271,1274],{},[43,1272,1273],{},"Keep fallback CSS next to the enhancement."," A fallback kept in a separate \"legacy\" file is out of sight and out of mind. Keeping it beside the enhanced rules — ideally in the same component file — means anyone editing the enhancement sees the fallback it depends on.",[29,1276,1278],{"id":1277},"when-a-real-old-browser-is-still-needed","When a real old browser is still needed",[14,1280,1281,1282,1285,1286,1289],{},"Forcing the branch tests ",[1177,1283,1284],{},"your"," fallback CSS rendered by a ",[1177,1287,1288],{},"modern"," engine. It cannot reveal bugs in the old engine's implementation of features the fallback uses — a flex gap quirk, an old grid bug — or JavaScript errors in scripts that assume newer APIs. For flows that matter commercially, such as checkout and sign-up, run the real target browsers through a device lab or cloud testing service on a regular schedule, perhaps monthly and before major releases. Use the analytics that justified supporting those browsers to decide which versions to include, and retire them from the matrix when their share falls below your threshold.",[29,1291,1293],{"id":1292},"browser-support","Browser support",[14,1295,1296,1298,1299,1302],{},[54,1297,56],{}," with property-value tests is supported in every browser that could be part of a fallback audience, and ",[54,1300,1301],{},"@supports selector()"," in Chrome and Edge 83+, Firefox 69+ and Safari 14.1+. Container queries are supported in Chrome and Edge 105+, Firefox 110+ and Safari 16+. Media-feature emulation is available in the DevTools of current Chromium browsers and Firefox; Safari's Web Inspector can emulate a subset, including reduced motion and colour scheme.",[29,1304,1306],{"id":1305},"faq","FAQ",[14,1308,1309,1312,1313,1315],{},[43,1310,1311],{},"How can I see my fallback layout in a browser that supports container queries?","\nForce the fallback branch. The simplest way is to wrap enhancements in ",[54,1314,56],{}," and, during testing, change the condition to something no browser supports, or gate the enhancement layer behind a class or attribute you can remove. The page then renders the baseline exactly as an old browser would.",[14,1317,1318,1321],{},[43,1319,1320],{},"Is testing in a modern browser enough to trust a fallback?","\nIt catches most problems, because a fallback is ordinary CSS that modern browsers render the same way old ones do. It will not catch bugs in the old engine itself. Test the real old browser occasionally through a device lab or cloud service for any flow that matters commercially.",[14,1323,1324,1327],{},[43,1325,1326],{},"Why do fallbacks break over time?","\nBecause nobody sees them. New features get added to the enhanced layer only, the baseline is never re-rendered, and a change to shared markup or tokens quietly breaks it. Automated screenshot tests of the forced fallback catch this before users do.",[14,1329,1330,1333,1334,355,1337,1340,1341,1343,1344,1346],{},[43,1331,1332],{},"Can DevTools emulate an older browser?","\nNot in the sense of disabling CSS features. DevTools can emulate media features such as ",[54,1335,1336],{},"prefers-reduced-motion",[54,1338,1339],{},"forced-colors"," and print, and throttle CPU and network, but it cannot make the engine forget ",[54,1342,1081],{},". Forcing the ",[54,1345,56],{}," branch is the practical substitute.",[29,1348,1350],{"id":1349},"related","Related",[37,1352,1353,1358,1365,1372],{},[40,1354,1355,1357],{},[18,1356,21],{"href":20}," — the parent guide.",[40,1359,1360,1364],{},[18,1361,1363],{"href":1362},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ffeature-detection-with-supports\u002F","Feature Detection With @supports"," — writing the conditions being forced here.",[40,1366,1367,1371],{},[18,1368,1370],{"href":1369},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fintrinsic-layout-fallbacks-without-queries\u002F","Intrinsic Layout Fallbacks Without Queries"," — baselines worth testing.",[40,1373,1374,1378],{},[18,1375,1377],{"href":1376},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-animation-fallbacks\u002F","Scroll-Driven Animation Fallbacks"," — another enhancement path to exercise.",[385,1380,1381],{},"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 .sLBg1, html code.shiki .sLBg1{--shiki-default:#66707B;--shiki-dark:#BDC4CC}html pre.shiki code .sHUrx, html code.shiki .sHUrx{--shiki-default:#A0111F;--shiki-dark:#FF9492}html pre.shiki code .sKwhi, html code.shiki .sKwhi{--shiki-default:#622CBC;--shiki-dark:#DBB7FF}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":181,"searchDepth":205,"depth":205,"links":1383},[1384,1385,1386,1387,1388,1389,1390,1391,1392],{"id":31,"depth":205,"text":32},{"id":163,"depth":205,"text":164},{"id":1104,"depth":205,"text":1105},{"id":1183,"depth":205,"text":1184},{"id":1236,"depth":205,"text":1237},{"id":1277,"depth":205,"text":1278},{"id":1292,"depth":205,"text":1293},{"id":1305,"depth":205,"text":1306},{"id":1349,"depth":205,"text":1350},"Exercise @supports fallback paths in a modern browser: force the unsupported branch, emulate media features, and run visual tests on both paths so neither rots.","md",{"pageTitle":1396,"datePublished":1397,"dateModified":1397,"faq":1398},"Testing CSS Fallbacks Without Old Browsers","2026-09-18",[1399,1401,1403,1405],{"q":1311,"a":1400},"Force the fallback branch. The simplest way is to wrap enhancements in @supports and, during testing, change the condition to something no browser supports, or gate the enhancement layer behind a class or attribute you can remove. The page then renders the baseline exactly as an old browser would.",{"q":1320,"a":1402},"It catches most problems, because a fallback is ordinary CSS that modern browsers render the same way old ones do. It will not catch bugs in the old engine itself. Test the real old browser occasionally through a device lab or cloud service for any flow that matters commercially.",{"q":1326,"a":1404},"Because nobody sees them. New features get added to the enhanced layer only, the baseline is never re-rendered, and a change to shared markup or tokens quietly breaks it. Automated screenshot tests of the forced fallback catch this before users do.",{"q":1332,"a":1406},"Not in the sense of disabling CSS features. DevTools can emulate media features such as prefers-reduced-motion, forced-colors and print, and throttle CPU and network, but it cannot make the engine forget @container. Forcing the @supports branch is the practical substitute.","\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ftesting-fallbacks-without-old-browsers",{"title":5,"description":1393},"mastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ftesting-fallbacks-without-old-browsers\u002Findex","LniwSAQZ0Qw-9tU6gLsrNFRVT_VyMA7UhVifSFiqkKU",[1412,1415,1418,1421,1424,1427,1430,1433,1436,1439,1442,1445,1448,1451,1454,1457,1460,1463,1466,1469,1472,1475,1478,1481,1484,1487,1490,1493,1496,1499,1502,1505,1508,1511,1514,1517,1520,1523,1526,1529,1532,1535,1538,1541,1544,1547,1550,1553,1556,1559,1562,1565,1568,1571,1574,1577,1580,1583,1586,1589,1592,1595,1598,1601,1604,1607,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,1693,1696,1699,1702,1705,1708,1711,1714,1717,1720,1723,1726,1729,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,1831,1834,1837,1840,1843,1846,1849,1852,1855,1858,1861,1864,1867,1870,1873,1876,1879,1882,1885,1888,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],{"path":1413,"title":1414},"\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":1416,"title":1417},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fflashing-content-and-seizure-thresholds","Flashing Content and Seizure Thresholds",{"path":1419,"title":1420},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fforced-colors-mode-and-animations","Forced Colors Mode and Animations",{"path":1422,"title":1423},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations","Accessibility in CSS Animations: Patterns, Specs & Best Practices",{"path":1425,"title":1426},"\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":1428,"title":1429},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fprefers-reduced-motion-recipes","prefers-reduced-motion Recipes: A Reduction for Every Common Effect",{"path":1431,"title":1432},"\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":1434,"title":1435},"\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":1437,"title":1438},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fvestibular-safe-animation-patterns","Vestibular-Safe Animation Patterns: Why Some Motion Makes People Sick",{"path":1440,"title":1441},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fwcag-motion-success-criteria","WCAG Motion Success Criteria: What Each One Actually Requires",{"path":1443,"title":1444},"\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":1446,"title":1447},"\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":1449,"title":1450},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations","Clip-Path & Mask Animations: Animating Visibility Instead of Position",{"path":1452,"title":1453},"\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":1455,"title":1456},"\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":1458,"title":1459},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fanimating-gradients","Animating CSS Gradients: Smooth Colour Motion Without Jumps",{"path":1461,"title":1462},"\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":1464,"title":1465},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions","Color & Theme Transitions: Colour as Part of the Motion System",{"path":1467,"title":1468},"\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":1470,"title":1471},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fsmooth-theme-switching-transitions","Smooth Theme Switching: Crossfades, Circular Reveals and No Flash",{"path":1473,"title":1474},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fcontainer-query-hover-affordances","Container Query Hover Affordances: When Narrow Means Persistent, Not Hidden",{"path":1476,"title":1477},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion","Container-Aware Motion: Animation Sized by the Space a Component Actually Has",{"path":1479,"title":1480},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Flayout-change-animations-at-container-breakpoints","Animating Changes at Container Breakpoints",{"path":1482,"title":1483},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fmotion-driven-by-container-style-queries","Motion Driven by Container Style Queries",{"path":1485,"title":1486},"\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":1488,"title":1489},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fsuppressing-motion-in-small-containers","Suppressing Motion in Small Containers: Deliberately Animating Nothing",{"path":1491,"title":1492},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fcontrolling-css-animations-from-javascript","Controlling CSS Animations From JavaScript",{"path":1494,"title":1495},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api","CSS Animation vs the Web Animations API: A Decision Guide",{"path":1497,"title":1498},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fwaapi-vs-css-for-interruptible-ui","Interruptible UI: CSS Transitions vs WAAPI",{"path":1500,"title":1501},"\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":1503,"title":1504},"\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":1506,"title":1507},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fcustom-property-fallbacks-and-invalid-values","Custom Property Fallbacks and Invalid Values",{"path":1509,"title":1510},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Ffluid-spacing-tokens-driving-transition-durations","Fluid Spacing Tokens That Drive Transition Durations",{"path":1512,"title":1513},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture","CSS Custom Properties Architecture: Scalable Design Systems & Dynamic UI",{"path":1515,"title":1516},"\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":1518,"title":1519},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fscoping-custom-properties-to-components","Scoping Custom Properties to Components",{"path":1521,"title":1522},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fcss-transition-timing-functions","CSS Transition Timing Functions: ease, cubic-bezier(), steps() and linear()",{"path":1524,"title":1525},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals","CSS Transition Fundamentals: Architecture, Performance & Patterns",{"path":1527,"title":1528},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Finterrupted-and-reversing-transitions","Interrupted and Reversing Transitions: What Happens Mid-Flight",{"path":1530,"title":1531},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fstarting-style-entry-animations","@starting-style: Animating an Element's Very First Style Change",{"path":1533,"title":1534},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-delay-choreography","Choreographing Motion With transition-delay",{"path":1536,"title":1537},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-shorthand-and-multiple-properties","The transition Shorthand and Multiple Properties",{"path":1539,"title":1540},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransitioning-display-with-allow-discrete","Transitioning display with transition-behavior: allow-discrete and @starting-style",{"path":1542,"title":1543},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fanimating-dialog-open-and-close","Animating \u003Cdialog> Open and Close: Both Directions, No Library",{"path":1545,"title":1546},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fbackdrop-animations","Animating ::backdrop: Fades and Blurs Behind Dialogs and Popovers",{"path":1548,"title":1549},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations","Dialog & Popover Animations: Motion for the Top Layer",{"path":1551,"title":1552},"\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":1554,"title":1555},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fpopover-entry-and-exit-transitions","Popover Menus That Animate From Their Anchor",{"path":1557,"title":1558},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fchoosing-animation-durations","Choosing Animation Durations: How Long Motion Should Last",{"path":1560,"title":1561},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fcubic-bezier-overshoot-and-anticipation","Overshoot and Anticipation With cubic-bezier(): Motion With Character",{"path":1563,"title":1564},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fentry-vs-exit-easing","Entry vs Exit Easing: Different Curves for Arriving and Leaving",{"path":1566,"title":1567},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design","Easing & Motion Design: Making CSS Motion Feel Intentional",{"path":1569,"title":1570},"\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":1572,"title":1573},"\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":1575,"title":1576},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Faccessible-css-only-tooltips","Accessible CSS-Only Tooltips and Hover Cards With  and ",{"path":1578,"title":1579},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fbutton-press-and-active-states","Button Press and  States",{"path":1581,"title":1582},"\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":1584,"title":1585},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Ffocus-within-form-patterns"," Form Patterns: Styling a Group From the Field Inside It",{"path":1587,"title":1588},"\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":1590,"title":1591},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design","Hover & Focus State Design: Spec-Compliant Patterns for Modern UIs",{"path":1593,"title":1594},"\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":1596,"title":1597},"\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":1599,"title":1600},"\u002Fcss-only-micro-interactions-animations","CSS-Only Micro-Interactions & Animations: Architecture, Performance & Implementation",{"path":1602,"title":1603},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fanimation-composition-and-stacking","Stacking Animations With animation-composition",{"path":1605,"title":1606},"\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":1608,"title":1609},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcontainer-query-triggered-keyframe-animations","Container-Query-Triggered Keyframe Animations: Animate Differently per Available Space",{"path":1611,"title":1612},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-accordions-and-disclosure","CSS-Only Accordions and Disclosure Widgets with details and summary",{"path":1614,"title":1615},"\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":1617,"title":1618},"\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":1620,"title":1621},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns","Keyframe Animation Patterns: Spec-Compliant Architectures for Modern UIs",{"path":1623,"title":1624},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fmulti-step-keyframes-and-per-keyframe-easing","Multi-Step Keyframes and Per-Keyframe Easing",{"path":1626,"title":1627},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fstaggered-list-animations-with-custom-properties","Staggered List Animations Using --i Index Custom Properties",{"path":1629,"title":1630},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fanimating-box-shadow-and-filters-cheaply","Animating box-shadow and Filters Cheaply",{"path":1632,"title":1633},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcontain-property-for-animation-performance","The contain Property for Animation Performance",{"path":1635,"title":1636},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcss-triggers-layout-paint-composite","Layout, Paint and Composite: What Triggers What",{"path":1638,"title":1639},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration","Performance & GPU Acceleration in CSS: A Developer’s Blueprint",{"path":1641,"title":1642},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Foptimizing-css-animations-for-60fps","Optimizing CSS Animations for 60fps: Budgeting the Frame",{"path":1644,"title":1645},"\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":1647,"title":1648},"\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":1650,"title":1651},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations","Scroll-Driven Animations: Binding Motion to Scroll Position in Pure CSS",{"path":1653,"title":1654},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-animation-fallbacks","Shipping Scroll-Driven Animations Without Breaking Anything",{"path":1656,"title":1657},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-parallax-effects","Scroll-Driven Parallax Effects in CSS",{"path":1659,"title":1660},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-progress-bar-without-javascript","A Reading Progress Bar Driven by scroll(root)",{"path":1662,"title":1663},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-triggered-reveal-animations","Reveal-on-Scroll with view() and animation-range",{"path":1665,"title":1666},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Ftimeline-scope-for-cross-element-animations","timeline-scope for Cross-Element Animations",{"path":1668,"title":1669},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fview-timeline-and-animation-range","View Timelines and animation-range",{"path":1671,"title":1672},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fcross-document-view-transitions","Cross-Document View Transitions",{"path":1674,"title":1675},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers","View Transitions for CSS Developers: the Pseudo-Element Tree, Snapshots, and Named Elements",{"path":1677,"title":1678},"\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":1680,"title":1681},"\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":1683,"title":1684},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transition-types-and-classes","View Transition Types and Classes",{"path":1686,"title":1687},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-for-list-reordering","View Transitions for List Reordering",{"path":1689,"title":1690},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-with-reduced-motion","Honouring prefers-reduced-motion in View Transitions",{"path":823,"title":1692},"Modern CSS Layouts & Micro-Interactions",{"path":1694,"title":1695},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioned-tooltips","Anchor-Positioned Tooltips: Tethering, Flipping, and Getting the Semantics Right",{"path":1697,"title":1698},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioning-fallbacks","Anchor Positioning Fallbacks: A Graceful Floor for Older Browser Versions",{"path":1700,"title":1701},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-size-for-matching-widths","anchor-size(): Overlays That Match Their Trigger's Size",{"path":1703,"title":1704},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays","CSS Anchor Positioning and Overlays: Tethering Elements Without JavaScript",{"path":1706,"title":1707},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-attribute-and-css-styling","The popover Attribute: Top-Layer Overlays With No JavaScript",{"path":1709,"title":1710},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-light-dismiss-and-stacking","Popover Light Dismiss, Nesting and Stacking",{"path":1712,"title":1713},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fposition-area-grid-explained","position-area: The Anchor Placement Grid",{"path":1715,"title":1716},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fcontainer-query-polyfill-tradeoffs","Container Query Polyfills: What They Cost and When to Skip Them",{"path":1718,"title":1719},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ffeature-detection-with-supports","Feature Detection with @supports: Syntax, Semantics, and the Traps",{"path":1721,"title":1722},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fhandling-container-query-fallbacks-for-older-browsers","Handling Container Query Fallbacks for Older Browsers",{"path":1724,"title":1725},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks","Container Query Fallbacks: Spec-Compliant CSS Strategies for Legacy Browsers",{"path":1727,"title":1728},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fintrinsic-layout-fallbacks-without-queries","Intrinsic Layout Fallbacks: Baselines That Adapt Without Any Query",{"path":1407,"title":5},{"path":1731,"title":1732},"\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":1734,"title":1735},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-query-range-and-logic-operators","Container Query Range Syntax and Logic Operators",{"path":1737,"title":1738},"\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":1740,"title":1741},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-type-size-vs-inline-size","Choosing container-type: inline-size, size, or normal",{"path":1743,"title":1744},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-vs-media-queries-comparison","Container vs Media Queries: Choosing the Right Reference Box",{"path":1746,"title":1747},"\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":1749,"title":1750},"\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":1752,"title":1753},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics","Container Query Syntax Basics",{"path":1755,"title":1756},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fnesting-and-naming-container-queries","Nesting and Naming Container Queries: Targeting the Right Ancestor",{"path":1758,"title":1759},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fauto-fit-minmax-responsive-grids","Responsive Grids with repeat(auto-fit, minmax())",{"path":1761,"title":1762},"\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":1764,"title":1765},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fgrid-auto-flow-dense-packing","grid-auto-flow: dense for Packed Layouts",{"path":1767,"title":1768},"\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":1770,"title":1771},"\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":1773,"title":1774},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts","CSS Grid and Subgrid Layouts for Responsive Interfaces",{"path":1776,"title":1777},"\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":1779,"title":1780},"\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":1782,"title":1783},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fsubgrid-vs-nested-grid","Subgrid vs an Independently Nested Grid",{"path":1785,"title":1786},"\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":1788,"title":1789},"\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":1791,"title":1792},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-grow-and-flex-shrink-explained","flex-grow and flex-shrink Explained",{"path":1794,"title":1795},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-wrap-intrinsic-responsive-rows","Breakpoint-Free Responsive Rows With flex-wrap and flex-basis",{"path":1797,"title":1798},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflexbox-gap-and-spacing","Flexbox gap vs Margins: Spacing Items Without Edge Hacks",{"path":1800,"title":1801},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns","Flexbox Layout Patterns: One-Dimensional Layout for Real Components",{"path":1803,"title":1804},"\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":1806,"title":1807},"\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":1809,"title":1810},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fdebugging-clamp-values","Debugging clamp(): Values That Are Ignored, Stuck or Never Fluid",{"path":1812,"title":1813},"\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":1815,"title":1816},"\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":1818,"title":1819},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-type-accessibility-and-zoom","Fluid Type, Accessibility and Zoom: The vw-Only Trap",{"path":1821,"title":1822},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-typography-without-javascript","Fluid Typography Without JavaScript: A Precision CSS Reference",{"path":1824,"title":1825},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp","Fluid Typography with clamp(): A Practical Guide for Modern CSS",{"path":1827,"title":1828},"\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":1830,"title":26},"\u002Fmastering-container-queries-responsive-layouts",{"path":1832,"title":1833},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Faspect-ratio-for-responsive-media","Using aspect-ratio for Responsive Media and Preventing Layout Shift",{"path":1835,"title":1836},"\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":1838,"title":1839},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques","Intrinsic Sizing Techniques: Modern CSS Layouts for Responsive UI",{"path":1841,"title":1842},"\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":1844,"title":1845},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fmin-max-fit-content-explained","min-content, max-content, and fit-content() Explained",{"path":1847,"title":1848},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fobject-fit-and-object-position","object-fit and object-position: Images That Fit Any Box",{"path":1850,"title":1851},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fpreventing-flex-and-grid-overflow","The min-width: auto Trap in Flex and Grid Layouts",{"path":1853,"title":1854},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-for-reset-and-tokens","Cascade Layers for Reset and Design Tokens",{"path":1856,"title":1857},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-vs-specificity-hacks","Cascade Layers vs Specificity Hacks: Ordering Instead of Escalating",{"path":1859,"title":1860},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcss-scope-for-component-styles","@scope for Component Styles: Short Selectors That Cannot Leak",{"path":1862,"title":1863},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies","Modern CSS Reset Strategies: A Spec-Compliant Foundation",{"path":1865,"title":1866},"\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":1868,"title":1869},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fwriting-a-minimal-modern-reset","Writing a Minimal Modern CSS Reset: Every Line Justified",{"path":1871,"title":1872},"\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":1874,"title":1875},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fempty-and-loading-states-with-has","Empty and Loading States With ()",{"path":1877,"title":1878},"\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":1880,"title":1881},"\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":1883,"title":1884},"\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":1886,"title":1887},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has","Parent-Aware Layouts With :has(): Letting Containers React to Their Contents",{"path":1889,"title":1890},"\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":1892,"title":1893},"\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":1895,"title":1896},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-data-tables","Container Query Data Tables: Reflowing Tables to Cards",{"path":1898,"title":1899},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-sidebar-layouts","Container Query Sidebar Layouts That Travel Between Contexts",{"path":1901,"title":1902},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns","Responsive Component Patterns: Architecture & Implementation",{"path":1904,"title":1905},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-forms-with-container-queries","Responsive Forms with Container Queries: Reflow Without Losing the Wiring",{"path":1907,"title":1908},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-hero-sections-with-container-queries","Responsive Hero Sections With Container Queries",{"path":1910,"title":1911},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-navigation-without-media-queries","Responsive Navigation Without Media Queries Using Container Queries",{"path":1913,"title":1914},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-pricing-tables","Responsive Pricing Tables: Aligned Features, a Clear Recommendation, Any Width",{"path":1916,"title":1917},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Ftabs-that-become-accordions","Tabs That Become an Accordion: One Component, Two Layouts",{"path":1919,"title":1920},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fcss-only-carousel-with-scroll-snap","A CSS-Only Carousel With Scroll Snap",{"path":1922,"title":1923},"\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":1925,"title":1926},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts","Scroll Snap & Overflow Layouts: Designing Components That Scroll on Purpose",{"path":1928,"title":1929},"\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":1931,"title":1932},"\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":1934,"title":1935},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fcombining-size-and-style-queries","Combining Size and Style Container Queries",{"path":1937,"title":1938},"\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":1940,"title":1941},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state","Style Queries and Container State: Token-Driven Component Variants",{"path":1943,"title":1944},"\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":1946,"title":1947},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fstyle-query-component-variants","Component Variants With Style Queries: One Token, Many Looks",{"path":1949,"title":1950},"\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":1952,"title":1953},"\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":1955,"title":1956},"\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":1958,"title":1959},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout","Viewport Units & Mobile Layout: Designing for the Screen You Actually Get",{"path":1961,"title":1962},"\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":1964,"title":1965},"\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":1967,"title":1968},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Fvirtual-keyboard-and-interactive-widget","Layouts That Survive the Virtual Keyboard",{"title":1970,"caption":1971,"height":1972,"resizable":504,"html":1973,"css":1974},"Forcing the fallback branch with a switch","Leave the frame wide and tick \"Force fallback\": the enhanced three-column layout disappears and the intrinsic baseline renders, exactly as an older browser would show it.",320,"\n\u003Cdiv class=\"page\">\n  \u003Clabel class=\"switch\">\u003Cinput type=\"checkbox\" id=\"force\"> Force fallback\u003C\u002Flabel>\n  \u003Cdiv class=\"gallery-slot\">\n    \u003Cdiv class=\"gallery\">\n      \u003Cfigure>\u003Cdiv class=\"thumb\">\u003C\u002Fdiv>\u003Cfigcaption class=\"gallery__caption\">Harbour\u003C\u002Ffigcaption>\u003C\u002Ffigure>\n      \u003Cfigure>\u003Cdiv class=\"thumb\">\u003C\u002Fdiv>\u003Cfigcaption class=\"gallery__caption\">Ridge\u003C\u002Ffigcaption>\u003C\u002Ffigure>\n      \u003Cfigure>\u003Cdiv class=\"thumb\">\u003C\u002Fdiv>\u003Cfigcaption class=\"gallery__caption\">Orchard\u003C\u002Ffigcaption>\u003C\u002Ffigure>\n    \u003C\u002Fdiv>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>","\nbody { display: block; }\n.switch { display: inline-flex; gap: 0.4rem; align-items: center; margin-bottom: 0.75rem; }\n.switch input:focus-visible { outline: 2px solid var(--demo-accent); outline-offset: 2px; }\n.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; }\n.gallery figure { margin: 0; }\n.thumb { height: 5rem; border-radius: 8px; background: linear-gradient(135deg, #bae6fd, #0ea5e9); }\n.gallery__caption { font-size: 0.9rem; }\n.gallery-slot { container-type: inline-size; }\n@supports (container-type: inline-size) {\n  .page:not(:has(#force:checked)) {\n    @container (width > 30rem) {\n      .gallery { grid-template-columns: 2fr 1fr 1fr; }\n      .gallery > :first-child { grid-row: span 2; }\n      .gallery > :first-child .thumb { height: 12rem; }\n      .gallery__caption { font-size: 1rem; }\n    }\n  }\n}",1789717749587]