[{"data":1,"prerenderedAt":2222},["ShallowReactive",2],{"page-\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Finterpolate-size-for-height-auto-animation\u002F":3,"content-all-pages":1657,"live-demo:height-auto-details":2216},{"id":4,"title":5,"body":6,"description":1635,"extension":1636,"meta":1637,"navigation":364,"path":1653,"seo":1654,"stem":1655,"__hash__":1656},"content\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Finterpolate-size-for-height-auto-animation\u002Findex.md","Animating to height: auto With interpolate-size and calc-size()",{"type":7,"value":8,"toc":1623},"minimark",[9,26,65,70,87,98,107,185,189,203,207,1031,1052,1056,1074,1150,1160,1178,1190,1204,1397,1422,1426,1429,1449,1458,1467,1470,1474,1481,1490,1494,1511,1515,1536,1549,1570,1588,1592,1620],[10,11,13,14,18,19,22,23],"h1",{"id":12},"animating-to-height-auto-with-interpolate-size-and-calc-size","Animating to ",[15,16,17],"code",{},"height: auto"," With ",[15,20,21],{},"interpolate-size"," and ",[15,24,25],{},"calc-size()",[27,28,29,30,33,34,37,38,40,41,33,44,46,47,50,51,53,54,59,60,64],"p",{},"\"Transition ",[15,31,32],{},"height"," to ",[15,35,36],{},"auto","\" is one of the oldest unsolved requests in CSS. Accordions, expanding cards, \"show more\" sections and collapsible navigation all want to grow to fit their content, but ",[15,39,36],{}," is a keyword, and the browser has never interpolated between a length and a keyword — so ",[15,42,43],{},"height: 0",[15,45,17],{}," simply snapped. The workarounds were all compromises: animating ",[15,48,49],{},"max-height"," to a guessed large value, measuring in JavaScript, or scaling with transforms and distorting the content. The narrow problem this page solves is animating to and from intrinsic sizes properly, using ",[15,52,21],{}," where it exists and a robust grid fallback where it does not. It belongs to ",[55,56,58],"a",{"href":57},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002F","Dialog & Popover Animations"," in the ",[55,61,63],{"href":62},"\u002Fcss-only-micro-interactions-animations\u002F","CSS-Only Micro-Interactions & Animations"," guide.",[66,67,69],"h2",{"id":68},"why-the-old-workarounds-were-not-good-enough","Why the old workarounds were not good enough",[27,71,72,73,75,76,79,80,83,84,86],{},"The ",[15,74,49],{}," trick sets ",[15,77,78],{},"max-height: 0"," when closed and something like ",[15,81,82],{},"max-height: 1000px"," when open, and transitions ",[15,85,49],{},". It works, but the timing is wrong: the transition runs across 1000 pixels, so for a 200-pixel panel the visible part of the animation happens in the first fifth of the duration when opening and the last fifth when closing. Opening looks too fast, closing appears to hang and then snap. And if content ever exceeds the guess, it is clipped.",[27,88,89,90,93,94,97],{},"Measuring with JavaScript — reading ",[15,91,92],{},"scrollHeight"," and setting it as an inline height — gets the timing right but costs a forced layout per toggle and puts the animation in script. Scaling with ",[15,95,96],{},"transform: scaleY()"," is compositor-friendly but squashes text and does not move the content below.",[27,99,100,101,103,104,106],{},"What was needed was for the browser to resolve ",[15,102,36],{}," to its actual pixel size for the purpose of interpolation. That is exactly what ",[15,105,21],{}," does.",[108,109,115,116,115,120,115,124,115,132,115,141,115,144,115,151,115,158,115,162,115,168,115,175,115,179],"svg",{"viewBox":110,"role":111,"ariaLabel":112,"xmlns":113,"style":114},"0 0 720 300","img","Height over time for the max-height hack, which moves most of its visible change early, versus interpolate-size, which spreads the change across the whole duration","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","width:100%;height:auto;max-width:720px;margin:2rem 0","\n  ",[117,118,119],"title",{},"max-height guessing versus real interpolation",[121,122,123],"desc",{},"Two curves of visible height against time for a 200 pixel panel. With max-height transitioning to 1000 pixels, visible height reaches 200 in the first fifth of the duration and then stays flat. With interpolate-size, visible height rises across the entire duration and reaches 200 at the end.",[125,126,131],"text",{"textAnchor":127,"x":128,"y":129,"style":130},"middle","360","26","text-anchor:middle;fill:currentColor;font:700 17px sans-serif","Opening a 200px panel over 400ms",[133,134],"line",{"x1":135,"y1":136,"x2":137,"y2":136,"stroke":138,"strokeWidth":139,"opacity":140},"80","240","660","currentColor","1.5","0.6",[133,142],{"x1":135,"y1":143,"x2":135,"y2":136,"stroke":138,"strokeWidth":139,"opacity":140},"60",[133,145],{"x1":135,"y1":146,"x2":137,"y2":146,"stroke":138,"strokeDashArray":147,"opacity":150},"100",[148,149],"5","4","0.5",[125,152,157],{"textAnchor":153,"x":154,"y":155,"style":156},"end","72","104","text-anchor:end;fill:currentColor;font:11px ui-monospace,monospace","200px",[125,159,161],{"textAnchor":153,"x":137,"y":160,"style":156},"262","400ms",[163,164],"path",{"d":165,"fill":166,"stroke":138,"strokeWidth":167,"opacity":140},"M80 240 L196 100 L660 100","none","3",[125,169,174],{"textAnchor":170,"x":171,"y":172,"style":173},"start","300","90","text-anchor:start;fill:currentColor;font:12px sans-serif","max-height hack: done at 80ms, then idle",[163,176],{"d":177,"fill":166,"stroke":178,"strokeWidth":149},"M80 240 C250 110 420 102 660 100","#7aa2ff",[125,180,184],{"textAnchor":127,"x":181,"y":182,"style":183},"430","150","text-anchor:middle;fill:currentColor;font:600 12px sans-serif","interpolate-size: uses the whole duration",[66,186,188],{"id":187},"the-complete-implementation","The complete implementation",[27,190,191,192,195,196,199,200,202],{},"The accordion below uses the native ",[15,193,194],{},"\u003Cdetails>"," element, ",[15,197,198],{},"::details-content"," for the animatable panel, and ",[15,201,21],{}," to reach the content's real height. It needs no script at all.",[204,205],"live-demo",{"name":206},"height-auto-details",[208,209,214],"pre",{"className":210,"code":211,"language":212,"meta":213,"style":213},"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>Animating to height: auto\u003C\u002Ftitle>\n\u003Cstyle>\n  \u002F* Opt in once. The property inherits, so every descendant may now\n     interpolate to and from auto, fit-content, min-content, etc. *\u002F\n  :root { interpolate-size: allow-keywords; }\n\n  body { font: 16px\u002F1.6 system-ui, sans-serif; margin: 2rem; max-width: 36rem; }\n\n  details {\n    border: 1px solid #cbd5e1;\n    border-radius: 10px;\n    margin-block-end: 0.75rem;\n  }\n\n  summary {\n    padding: 0.75rem 1rem;\n    cursor: pointer;\n    font-weight: 600;\n  }\n  summary:focus-visible { outline: 2px solid #4f46e5; outline-offset: 2px; border-radius: 10px; }\n\n  \u002F* ::details-content is the wrapper around everything except \u003Csummary>.\n     Closed: zero height, hidden overflow. content-visibility is what the\n     browser toggles to hide it, so it must be allowed to transition too. *\u002F\n  details::details-content {\n    block-size: 0;\n    overflow: clip;\n    transition:\n      block-size 300ms cubic-bezier(0.22, 1, 0.36, 1),\n      content-visibility 300ms allow-discrete;\n  }\n\n  \u002F* Open: grow to the content's natural height. *\u002F\n  details[open]::details-content {\n    block-size: auto;\n  }\n\n  .panel { padding: 0 1rem 1rem; }\n\n  @media (prefers-reduced-motion: reduce) {\n    details::details-content { transition: none; }\n  }\n\u003C\u002Fstyle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cdetails>\n    \u003Csummary>What is included in the plan?\u003C\u002Fsummary>\n    \u003Cdiv class=\"panel\">\u003Cp>Unlimited projects, five collaborators and daily backups.\u003C\u002Fp>\u003C\u002Fdiv>\n  \u003C\u002Fdetails>\n  \u003Cdetails>\n    \u003Csummary>Can I change plans later?\u003C\u002Fsummary>\n    \u003Cdiv class=\"panel\">\u003Cp>Yes. Upgrades apply immediately; downgrades apply at the next billing date.\u003C\u002Fp>\u003C\u002Fdiv>\n  \u003C\u002Fdetails>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n","html","",[15,215,216,235,255,265,283,308,322,332,339,345,359,366,431,436,445,467,482,497,503,508,516,535,548,561,566,614,619,625,631,637,650,663,676,685,721,734,739,744,750,768,779,784,789,814,819,828,849,854,864,873,883,894,910,943,953,962,976,1004,1013,1022],{"__ignoreMap":213},[217,218,220,224,228,232],"span",{"class":133,"line":219},1,[217,221,223],{"class":222},"suds8","\u003C!",[217,225,227],{"class":226},"sne4z","doctype",[217,229,231],{"class":230},"s-5SL"," html",[217,233,234],{"class":222},">\n",[217,236,238,241,243,246,249,253],{"class":133,"line":237},2,[217,239,240],{"class":222},"\u003C",[217,242,212],{"class":226},[217,244,245],{"class":230}," lang",[217,247,248],{"class":222},"=",[217,250,252],{"class":251},"sT6z2","\"en\"",[217,254,234],{"class":222},[217,256,258,260,263],{"class":133,"line":257},3,[217,259,240],{"class":222},[217,261,262],{"class":226},"head",[217,264,234],{"class":222},[217,266,268,270,273,276,278,281],{"class":133,"line":267},4,[217,269,240],{"class":222},[217,271,272],{"class":226},"meta",[217,274,275],{"class":230}," charset",[217,277,248],{"class":222},[217,279,280],{"class":251},"\"utf-8\"",[217,282,234],{"class":222},[217,284,286,288,290,293,295,298,301,303,306],{"class":133,"line":285},5,[217,287,240],{"class":222},[217,289,272],{"class":226},[217,291,292],{"class":230}," name",[217,294,248],{"class":222},[217,296,297],{"class":251},"\"viewport\"",[217,299,300],{"class":230}," content",[217,302,248],{"class":222},[217,304,305],{"class":251},"\"width=device-width, initial-scale=1\"",[217,307,234],{"class":222},[217,309,311,313,315,318,320],{"class":133,"line":310},6,[217,312,240],{"class":222},[217,314,117],{"class":226},[217,316,317],{"class":222},">Animating to height: auto\u003C\u002F",[217,319,117],{"class":226},[217,321,234],{"class":222},[217,323,325,327,330],{"class":133,"line":324},7,[217,326,240],{"class":222},[217,328,329],{"class":226},"style",[217,331,234],{"class":222},[217,333,335],{"class":133,"line":334},8,[217,336,338],{"class":337},"sLBg1","  \u002F* Opt in once. The property inherits, so every descendant may now\n",[217,340,342],{"class":133,"line":341},9,[217,343,344],{"class":337},"     interpolate to and from auto, fit-content, min-content, etc. *\u002F\n",[217,346,348,351,354,356],{"class":133,"line":347},10,[217,349,350],{"class":230},"  :root",[217,352,353],{"class":222}," { ",[217,355,21],{"class":230},[217,357,358],{"class":222},": allow-keywords; }\n",[217,360,362],{"class":133,"line":361},11,[217,363,365],{"emptyLinePlaceholder":364},true,"\n",[217,367,369,372,374,377,380,383,387,390,393,396,399,402,405,408,410,413,416,418,421,423,426,428],{"class":133,"line":368},12,[217,370,371],{"class":226},"  body",[217,373,353],{"class":222},[217,375,376],{"class":230},"font",[217,378,379],{"class":222},": ",[217,381,382],{"class":230},"16",[217,384,386],{"class":385},"sHUrx","px",[217,388,389],{"class":222},"\u002F",[217,391,392],{"class":230},"1.6",[217,394,395],{"class":230}," system-ui",[217,397,398],{"class":222},", ",[217,400,401],{"class":230},"sans-serif",[217,403,404],{"class":222},"; ",[217,406,407],{"class":230},"margin",[217,409,379],{"class":222},[217,411,412],{"class":230},"2",[217,414,415],{"class":385},"rem",[217,417,404],{"class":222},[217,419,420],{"class":230},"max-width",[217,422,379],{"class":222},[217,424,425],{"class":230},"36",[217,427,415],{"class":385},[217,429,430],{"class":222},"; }\n",[217,432,434],{"class":133,"line":433},13,[217,435,365],{"emptyLinePlaceholder":364},[217,437,439,442],{"class":133,"line":438},14,[217,440,441],{"class":226},"  details",[217,443,444],{"class":222}," {\n",[217,446,448,451,453,456,458,461,464],{"class":133,"line":447},15,[217,449,450],{"class":230},"    border",[217,452,379],{"class":222},[217,454,455],{"class":230},"1",[217,457,386],{"class":385},[217,459,460],{"class":230}," solid",[217,462,463],{"class":230}," #cbd5e1",[217,465,466],{"class":222},";\n",[217,468,470,473,475,478,480],{"class":133,"line":469},16,[217,471,472],{"class":230},"    border-radius",[217,474,379],{"class":222},[217,476,477],{"class":230},"10",[217,479,386],{"class":385},[217,481,466],{"class":222},[217,483,485,488,490,493,495],{"class":133,"line":484},17,[217,486,487],{"class":230},"    margin-block-end",[217,489,379],{"class":222},[217,491,492],{"class":230},"0.75",[217,494,415],{"class":385},[217,496,466],{"class":222},[217,498,500],{"class":133,"line":499},18,[217,501,502],{"class":222},"  }\n",[217,504,506],{"class":133,"line":505},19,[217,507,365],{"emptyLinePlaceholder":364},[217,509,511,514],{"class":133,"line":510},20,[217,512,513],{"class":226},"  summary",[217,515,444],{"class":222},[217,517,519,522,524,526,528,531,533],{"class":133,"line":518},21,[217,520,521],{"class":230},"    padding",[217,523,379],{"class":222},[217,525,492],{"class":230},[217,527,415],{"class":385},[217,529,530],{"class":230}," 1",[217,532,415],{"class":385},[217,534,466],{"class":222},[217,536,538,541,543,546],{"class":133,"line":537},22,[217,539,540],{"class":230},"    cursor",[217,542,379],{"class":222},[217,544,545],{"class":230},"pointer",[217,547,466],{"class":222},[217,549,551,554,556,559],{"class":133,"line":550},23,[217,552,553],{"class":230},"    font-weight",[217,555,379],{"class":222},[217,557,558],{"class":230},"600",[217,560,466],{"class":222},[217,562,564],{"class":133,"line":563},24,[217,565,502],{"class":222},[217,567,569,571,574,576,579,581,583,585,587,590,592,595,597,599,601,603,606,608,610,612],{"class":133,"line":568},25,[217,570,513],{"class":226},[217,572,573],{"class":230},":focus-visible",[217,575,353],{"class":222},[217,577,578],{"class":230},"outline",[217,580,379],{"class":222},[217,582,412],{"class":230},[217,584,386],{"class":385},[217,586,460],{"class":230},[217,588,589],{"class":230}," #4f46e5",[217,591,404],{"class":222},[217,593,594],{"class":230},"outline-offset",[217,596,379],{"class":222},[217,598,412],{"class":230},[217,600,386],{"class":385},[217,602,404],{"class":222},[217,604,605],{"class":230},"border-radius",[217,607,379],{"class":222},[217,609,477],{"class":230},[217,611,386],{"class":385},[217,613,430],{"class":222},[217,615,617],{"class":133,"line":616},26,[217,618,365],{"emptyLinePlaceholder":364},[217,620,622],{"class":133,"line":621},27,[217,623,624],{"class":337},"  \u002F* ::details-content is the wrapper around everything except \u003Csummary>.\n",[217,626,628],{"class":133,"line":627},28,[217,629,630],{"class":337},"     Closed: zero height, hidden overflow. content-visibility is what the\n",[217,632,634],{"class":133,"line":633},29,[217,635,636],{"class":337},"     browser toggles to hide it, so it must be allowed to transition too. *\u002F\n",[217,638,640,642,645,648],{"class":133,"line":639},30,[217,641,441],{"class":226},[217,643,644],{"class":222},"::",[217,646,647],{"class":226},"details-content",[217,649,444],{"class":222},[217,651,653,656,658,661],{"class":133,"line":652},31,[217,654,655],{"class":230},"    block-size",[217,657,379],{"class":222},[217,659,660],{"class":230},"0",[217,662,466],{"class":222},[217,664,666,669,671,674],{"class":133,"line":665},32,[217,667,668],{"class":230},"    overflow",[217,670,379],{"class":222},[217,672,673],{"class":230},"clip",[217,675,466],{"class":222},[217,677,679,682],{"class":133,"line":678},33,[217,680,681],{"class":230},"    transition",[217,683,684],{"class":222},":\n",[217,686,688,691,693,696,699,702,705,707,709,711,714,716,718],{"class":133,"line":687},34,[217,689,690],{"class":222},"      block-size ",[217,692,171],{"class":230},[217,694,695],{"class":385},"ms",[217,697,698],{"class":230}," cubic-bezier",[217,700,701],{"class":222},"(",[217,703,704],{"class":230},"0.22",[217,706,398],{"class":222},[217,708,455],{"class":230},[217,710,398],{"class":222},[217,712,713],{"class":230},"0.36",[217,715,398],{"class":222},[217,717,455],{"class":230},[217,719,720],{"class":222},"),\n",[217,722,724,727,729,731],{"class":133,"line":723},35,[217,725,726],{"class":222},"      content-visibility ",[217,728,171],{"class":230},[217,730,695],{"class":385},[217,732,733],{"class":222}," allow-discrete;\n",[217,735,737],{"class":133,"line":736},36,[217,738,502],{"class":222},[217,740,742],{"class":133,"line":741},37,[217,743,365],{"emptyLinePlaceholder":364},[217,745,747],{"class":133,"line":746},38,[217,748,749],{"class":337},"  \u002F* Open: grow to the content's natural height. *\u002F\n",[217,751,753,755,758,761,764,766],{"class":133,"line":752},39,[217,754,441],{"class":226},[217,756,757],{"class":222},"[",[217,759,760],{"class":230},"open",[217,762,763],{"class":222},"]::",[217,765,647],{"class":226},[217,767,444],{"class":222},[217,769,771,773,775,777],{"class":133,"line":770},40,[217,772,655],{"class":230},[217,774,379],{"class":222},[217,776,36],{"class":230},[217,778,466],{"class":222},[217,780,782],{"class":133,"line":781},41,[217,783,502],{"class":222},[217,785,787],{"class":133,"line":786},42,[217,788,365],{"emptyLinePlaceholder":364},[217,790,792,795,797,800,802,804,806,808,810,812],{"class":133,"line":791},43,[217,793,794],{"class":230},"  .panel",[217,796,353],{"class":222},[217,798,799],{"class":230},"padding",[217,801,379],{"class":222},[217,803,660],{"class":230},[217,805,530],{"class":230},[217,807,415],{"class":385},[217,809,530],{"class":230},[217,811,415],{"class":385},[217,813,430],{"class":222},[217,815,817],{"class":133,"line":816},44,[217,818,365],{"emptyLinePlaceholder":364},[217,820,822,825],{"class":133,"line":821},45,[217,823,824],{"class":385},"  @media",[217,826,827],{"class":222}," (prefers-reduced-motion: reduce) {\n",[217,829,831,834,836,838,840,843,845,847],{"class":133,"line":830},46,[217,832,833],{"class":226},"    details",[217,835,644],{"class":222},[217,837,647],{"class":226},[217,839,353],{"class":222},[217,841,842],{"class":230},"transition",[217,844,379],{"class":222},[217,846,166],{"class":230},[217,848,430],{"class":222},[217,850,852],{"class":133,"line":851},47,[217,853,502],{"class":222},[217,855,857,860,862],{"class":133,"line":856},48,[217,858,859],{"class":222},"\u003C\u002F",[217,861,329],{"class":226},[217,863,234],{"class":222},[217,865,867,869,871],{"class":133,"line":866},49,[217,868,859],{"class":222},[217,870,262],{"class":226},[217,872,234],{"class":222},[217,874,876,878,881],{"class":133,"line":875},50,[217,877,240],{"class":222},[217,879,880],{"class":226},"body",[217,882,234],{"class":222},[217,884,886,889,892],{"class":133,"line":885},51,[217,887,888],{"class":222},"  \u003C",[217,890,891],{"class":226},"details",[217,893,234],{"class":222},[217,895,897,900,903,906,908],{"class":133,"line":896},52,[217,898,899],{"class":222},"    \u003C",[217,901,902],{"class":226},"summary",[217,904,905],{"class":222},">What is included in the plan?\u003C\u002F",[217,907,902],{"class":226},[217,909,234],{"class":222},[217,911,913,915,918,921,923,926,929,931,934,936,939,941],{"class":133,"line":912},53,[217,914,899],{"class":222},[217,916,917],{"class":226},"div",[217,919,920],{"class":230}," class",[217,922,248],{"class":222},[217,924,925],{"class":251},"\"panel\"",[217,927,928],{"class":222},">\u003C",[217,930,27],{"class":226},[217,932,933],{"class":222},">Unlimited projects, five collaborators and daily backups.\u003C\u002F",[217,935,27],{"class":226},[217,937,938],{"class":222},">\u003C\u002F",[217,940,917],{"class":226},[217,942,234],{"class":222},[217,944,946,949,951],{"class":133,"line":945},54,[217,947,948],{"class":222},"  \u003C\u002F",[217,950,891],{"class":226},[217,952,234],{"class":222},[217,954,956,958,960],{"class":133,"line":955},55,[217,957,888],{"class":222},[217,959,891],{"class":226},[217,961,234],{"class":222},[217,963,965,967,969,972,974],{"class":133,"line":964},56,[217,966,899],{"class":222},[217,968,902],{"class":226},[217,970,971],{"class":222},">Can I change plans later?\u003C\u002F",[217,973,902],{"class":226},[217,975,234],{"class":222},[217,977,979,981,983,985,987,989,991,993,996,998,1000,1002],{"class":133,"line":978},57,[217,980,899],{"class":222},[217,982,917],{"class":226},[217,984,920],{"class":230},[217,986,248],{"class":222},[217,988,925],{"class":251},[217,990,928],{"class":222},[217,992,27],{"class":226},[217,994,995],{"class":222},">Yes. Upgrades apply immediately; downgrades apply at the next billing date.\u003C\u002F",[217,997,27],{"class":226},[217,999,938],{"class":222},[217,1001,917],{"class":226},[217,1003,234],{"class":222},[217,1005,1007,1009,1011],{"class":133,"line":1006},58,[217,1008,948],{"class":222},[217,1010,891],{"class":226},[217,1012,234],{"class":222},[217,1014,1016,1018,1020],{"class":133,"line":1015},59,[217,1017,859],{"class":222},[217,1019,880],{"class":226},[217,1021,234],{"class":222},[217,1023,1025,1027,1029],{"class":133,"line":1024},60,[217,1026,859],{"class":222},[217,1028,212],{"class":226},[217,1030,234],{"class":222},[27,1032,1033,1034,1036,1037,1040,1041,1043,1044,1047,1048,1051],{},"Two details make this work. First, the browser hides a closed ",[15,1035,194],{}," element's content with ",[15,1038,1039],{},"content-visibility: hidden"," on ",[15,1042,198],{},", so that property must be transitioned with ",[15,1045,1046],{},"allow-discrete"," or the content would disappear the moment closing begins, before the height has had time to shrink. Second, ",[15,1049,1050],{},"overflow: clip"," keeps content from spilling out while the box is shorter than its content, without creating a scroll container.",[66,1053,1055],{"id":1054},"the-key-technique-resolving-keywords-for-interpolation","The key technique: resolving keywords for interpolation",[27,1057,1058,1061,1062,398,1064,398,1067,398,1070,1073],{},[15,1059,1060],{},"interpolate-size: allow-keywords"," changes one rule of the animation engine. Normally, when a transition's start or end value is an intrinsic sizing keyword — ",[15,1063,36],{},[15,1065,1066],{},"fit-content",[15,1068,1069],{},"min-content",[15,1071,1072],{},"max-content"," — the browser cannot interpolate and the value flips discretely. With the opt-in, the browser resolves the keyword to the length it would compute right now and interpolates between lengths.",[108,1075,115,1078,115,1081,115,1084,115,1087,115,1093,115,1100,115,1106,115,1110,115,1113,115,1116,115,1120,115,1124,115,1127,115,1132,115,1137,115,1139,115,1142,115,1146],{"viewBox":1076,"role":111,"ariaLabel":1077,"xmlns":113,"style":114},"0 0 720 280","Diagram: without interpolate-size the keyword auto cannot be tweened and the value snaps; with it, auto resolves to a pixel length and the browser tweens between lengths",[117,1079,1080],{},"How allow-keywords changes interpolation",[121,1082,1083],{},"Top row: 0px to auto with the default interpolate-size of numeric-only produces a discrete snap. Bottom row: with allow-keywords, auto is resolved to 184px and the browser interpolates 0px to 184px smoothly.",[125,1085,1086],{"textAnchor":127,"x":128,"y":129,"style":130},"block-size: 0 → auto",[125,1088,1092],{"textAnchor":170,"x":1089,"y":1090,"style":1091},"40","74","text-anchor:start;fill:currentColor;font:600 12px ui-monospace,monospace","numeric-only (default)",[1094,1095],"rect",{"x":1096,"y":1097,"width":1098,"height":425,"rx":1099,"fill":166,"stroke":138,"strokeWidth":139,"opacity":140},"260","54","120","6",[125,1101,1105],{"textAnchor":127,"x":1102,"y":1103,"style":1104},"320","77","text-anchor:middle;fill:currentColor;font:12px ui-monospace,monospace","0px",[125,1107,1109],{"textAnchor":127,"x":181,"y":1103,"style":1108},"text-anchor:middle;fill:currentColor;font:12px sans-serif","snaps to",[1094,1111],{"x":1112,"y":1097,"width":1098,"height":425,"rx":1099,"fill":166,"stroke":138,"strokeWidth":139,"opacity":140},"480",[125,1114,36],{"textAnchor":127,"x":1115,"y":1103,"style":1104},"540",[125,1117,1119],{"textAnchor":170,"x":1089,"y":1118,"style":1091},"164","allow-keywords",[1094,1121],{"x":1096,"y":1122,"width":1098,"height":425,"rx":1099,"fill":178,"opacity":1123},"144","0.3",[125,1125,1105],{"textAnchor":127,"x":1102,"y":1126,"style":1104},"167",[133,1128],{"x1":1129,"y1":1130,"x2":1131,"y2":1130,"stroke":178,"strokeWidth":149},"384","162","476",[125,1133,1136],{"textAnchor":127,"x":181,"y":1134,"style":1135},"152","text-anchor:middle;fill:currentColor;font:11px sans-serif","tweens",[1094,1138],{"x":1112,"y":1122,"width":1098,"height":425,"rx":1099,"fill":178,"opacity":1123},[125,1140,1141],{"textAnchor":127,"x":1115,"y":1126,"style":1104},"auto = 184px",[125,1143,1145],{"textAnchor":127,"x":128,"y":1144,"style":1108},"232","The keyword is resolved to the length it would compute at that moment,",[125,1147,1149],{"textAnchor":127,"x":128,"y":1148,"style":1108},"252","so the animation ends exactly at the content's real size.",[27,1151,1152,1153,1155,1156,1159],{},"It is opt-in, rather than the default, for backward compatibility: some existing sites transition between a length and ",[15,1154,36],{}," and rely on the snap. Setting it on ",[15,1157,1158],{},":root"," enables it everywhere at once, which is almost always what a new project wants.",[27,1161,1162,1164,1165,1168,1169,1171,1172,1174,1175,1177],{},[15,1163,25],{}," is the related function for cases that need arithmetic on an intrinsic size. ",[15,1166,1167],{},"block-size: calc-size(auto, size + 1rem)"," means \"the auto height plus a rem\", and it is interpolable in its own right, even without ",[15,1170,21],{},". For plain ",[15,1173,36],{}," targets the opt-in is simpler; ",[15,1176,25],{}," is for when the target itself must be modified.",[66,1179,1181,1182,1185,1186,1189],{"id":1180},"variation-the-grid-0fr-1fr-fallback","Variation: the grid ",[15,1183,1184],{},"0fr"," → ",[15,1187,1188],{},"1fr"," fallback",[27,1191,1192,1193,1195,1196,33,1198,1200,1201,1203],{},"Where ",[15,1194,21],{}," is not supported, a grid provides nearly the same effect. A single-row grid whose row transitions from ",[15,1197,1184],{},[15,1199,1188],{}," animates between collapsed and content-height, because fractional track sizes are interpolable and a ",[15,1202,1188],{}," row in an auto-height grid is as tall as its content.",[208,1205,1209],{"className":1206,"code":1207,"language":1208,"meta":213,"style":213},"language-css shiki shiki-themes github-light-high-contrast github-dark-high-contrast",".collapsible {\n  display: grid;\n  grid-template-rows: 0fr;\n  transition: grid-template-rows 300ms cubic-bezier(0.22, 1, 0.36, 1);\n}\n\n.collapsible[data-open=\"true\"] {\n  grid-template-rows: 1fr;\n}\n\n\u002F* The single child must be allowed to shrink below its content. *\u002F\n.collapsible > .collapsible__inner {\n  min-height: 0;\n  overflow: hidden;\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .collapsible { transition: none; }\n}\n","css",[15,1210,1211,1218,1230,1244,1277,1282,1286,1303,1315,1319,1323,1328,1340,1351,1363,1367,1371,1378,1393],{"__ignoreMap":213},[217,1212,1213,1216],{"class":133,"line":219},[217,1214,1215],{"class":230},".collapsible",[217,1217,444],{"class":222},[217,1219,1220,1223,1225,1228],{"class":133,"line":237},[217,1221,1222],{"class":230},"  display",[217,1224,379],{"class":222},[217,1226,1227],{"class":230},"grid",[217,1229,466],{"class":222},[217,1231,1232,1235,1237,1239,1242],{"class":133,"line":257},[217,1233,1234],{"class":230},"  grid-template-rows",[217,1236,379],{"class":222},[217,1238,660],{"class":230},[217,1240,1241],{"class":385},"fr",[217,1243,466],{"class":222},[217,1245,1246,1249,1252,1254,1256,1258,1260,1262,1264,1266,1268,1270,1272,1274],{"class":133,"line":267},[217,1247,1248],{"class":230},"  transition",[217,1250,1251],{"class":222},": grid-template-rows ",[217,1253,171],{"class":230},[217,1255,695],{"class":385},[217,1257,698],{"class":230},[217,1259,701],{"class":222},[217,1261,704],{"class":230},[217,1263,398],{"class":222},[217,1265,455],{"class":230},[217,1267,398],{"class":222},[217,1269,713],{"class":230},[217,1271,398],{"class":222},[217,1273,455],{"class":230},[217,1275,1276],{"class":222},");\n",[217,1278,1279],{"class":133,"line":285},[217,1280,1281],{"class":222},"}\n",[217,1283,1284],{"class":133,"line":310},[217,1285,365],{"emptyLinePlaceholder":364},[217,1287,1288,1290,1292,1295,1297,1300],{"class":133,"line":324},[217,1289,1215],{"class":230},[217,1291,757],{"class":222},[217,1293,1294],{"class":230},"data-open",[217,1296,248],{"class":385},[217,1298,1299],{"class":251},"\"true\"",[217,1301,1302],{"class":222},"] {\n",[217,1304,1305,1307,1309,1311,1313],{"class":133,"line":334},[217,1306,1234],{"class":230},[217,1308,379],{"class":222},[217,1310,455],{"class":230},[217,1312,1241],{"class":385},[217,1314,466],{"class":222},[217,1316,1317],{"class":133,"line":341},[217,1318,1281],{"class":222},[217,1320,1321],{"class":133,"line":347},[217,1322,365],{"emptyLinePlaceholder":364},[217,1324,1325],{"class":133,"line":361},[217,1326,1327],{"class":337},"\u002F* The single child must be allowed to shrink below its content. *\u002F\n",[217,1329,1330,1332,1335,1338],{"class":133,"line":368},[217,1331,1215],{"class":230},[217,1333,1334],{"class":385}," >",[217,1336,1337],{"class":230}," .collapsible__inner",[217,1339,444],{"class":222},[217,1341,1342,1345,1347,1349],{"class":133,"line":433},[217,1343,1344],{"class":230},"  min-height",[217,1346,379],{"class":222},[217,1348,660],{"class":230},[217,1350,466],{"class":222},[217,1352,1353,1356,1358,1361],{"class":133,"line":438},[217,1354,1355],{"class":230},"  overflow",[217,1357,379],{"class":222},[217,1359,1360],{"class":230},"hidden",[217,1362,466],{"class":222},[217,1364,1365],{"class":133,"line":447},[217,1366,1281],{"class":222},[217,1368,1369],{"class":133,"line":469},[217,1370,365],{"emptyLinePlaceholder":364},[217,1372,1373,1376],{"class":133,"line":484},[217,1374,1375],{"class":385},"@media",[217,1377,827],{"class":222},[217,1379,1380,1383,1385,1387,1389,1391],{"class":133,"line":499},[217,1381,1382],{"class":230},"  .collapsible",[217,1384,353],{"class":222},[217,1386,842],{"class":230},[217,1388,379],{"class":222},[217,1390,166],{"class":230},[217,1392,430],{"class":222},[217,1394,1395],{"class":133,"line":505},[217,1396,1281],{"class":222},[27,1398,72,1399,1402,1403,1406,1407,1409,1410,1412,1413,1416,1417,1421],{},[15,1400,1401],{},"min-height: 0"," on the inner element is essential; without it, the grid item's automatic minimum keeps the row at content height and nothing collapses. The trick requires one extra wrapper element and a state hook — an attribute toggled by script, or a ",[15,1404,1405],{},":has(:checked)"," selector on a checkbox-driven disclosure — so it is heavier than the ",[15,1408,891],{}," version but works in every browser that supports grid track animation. Combining both, with the grid version as the baseline and ",[15,1411,198],{}," inside ",[15,1414,1415],{},"@supports (interpolate-size: allow-keywords)",", gives smooth disclosures everywhere. The disclosure pattern itself is developed in ",[55,1418,1420],{"href":1419},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-accordions-and-disclosure\u002F","CSS-Only Accordions and Disclosure",".",[66,1423,1425],{"id":1424},"beyond-height-other-intrinsic-sizes","Beyond height: other intrinsic sizes",[27,1427,1428],{},"Height is the famous case, but the opt-in covers every intrinsic sizing keyword in every sizing property, and several other components benefit.",[27,1430,1431,1437,1438,1441,1442,1444,1445,1448],{},[1432,1433,1434,1435,1421],"strong",{},"Width to ",[15,1436,1066],{}," A button whose label changes — \"Save\" becoming \"Saving…\" becoming \"Saved\" — can animate its width to the new label's size instead of jumping. With ",[15,1439,1440],{},"width: fit-content"," on the button and ",[15,1443,21],{}," enabled, a transition on ",[15,1446,1447],{},"width"," smooths every label change.",[27,1450,1451,1454,1455,1457],{},[1432,1452,1453],{},"Expanding search fields."," A search input that grows from an icon-sized box to ",[15,1456,1072],{}," or to a percentage when focused can transition between a fixed length and a keyword.",[27,1459,1460,1463,1464,1466],{},[1432,1461,1462],{},"Tabs and segmented controls."," An indicator that matches the width of the selected tab can size itself with ",[15,1465,1066],{}," on a positioned element, and animate its width as the selection moves between tabs of different lengths.",[27,1468,1469],{},"In each case the same caution applies: sizing properties drive layout, so the animation re-lays out the element and everything that depends on it each frame. Keep the affected subtree small — a button, a field, a tab bar — and the cost is negligible. Avoid applying it to large containers whose resize reflows the whole page, such as a sidebar whose width change pushes the main content across.",[66,1471,1473],{"id":1472},"performance-and-accessibility-notes","Performance and accessibility notes",[27,1475,1476,1477,1480],{},"Animating ",[15,1478,1479],{},"block-size"," is a layout animation: each frame recomputes the size of the panel and the position of everything after it. For a single accordion panel on a normal page that is inexpensive, but it cannot run on the compositor, so avoid animating many panels at once or panels with very complex content. Keep durations short — 200 to 300 milliseconds — so the layout work is brief.",[27,1482,1483,1484,1486,1487,1489],{},"The native ",[15,1485,194],{}," element carries the accessibility semantics: it is announced as a disclosure, toggled with Enter or Space, and its content is hidden from assistive technology when closed. The animation does not change any of that. Find-in-page can also open closed ",[15,1488,194],{}," elements to reveal matches, and the transition plays in that case too.",[66,1491,1493],{"id":1492},"browser-support","Browser support",[27,1495,1496,22,1498,1500,1501,1503,1504,1507,1508,1510],{},[15,1497,21],{},[15,1499,25],{}," are supported in Chrome and Edge 129+ and are not yet supported in Firefox or Safari. ",[15,1502,198],{}," is supported in Chrome and Edge 131+, Firefox 143+ and Safari 18.4+, so in Firefox and Safari the pseudo-element can be styled but its height snaps rather than animating. ",[15,1505,1506],{},"transition-behavior: allow-discrete"," is supported in Chrome and Edge 117+, Firefox 129+ and Safari 17.4+. The grid-row fallback works in every current engine. Guard the keyword version with ",[15,1509,1415],{}," if you combine the two.",[66,1512,1514],{"id":1513},"faq","FAQ",[27,1516,1517,1525,1527,1528,1530,1531,22,1533,1535],{},[1432,1518,1519,1520,33,1522,1524],{},"Why can't CSS transition ",[15,1521,32],{},[15,1523,36],{},"?",[15,1526,36],{}," is a keyword, not a length, so the browser historically had no number to interpolate toward. ",[15,1529,1060],{}," tells the browser to resolve intrinsic keywords such as ",[15,1532,36],{},[15,1534,1066],{}," to lengths for interpolation, which makes the transition possible.",[27,1537,1538,1544,1545,1548],{},[1432,1539,1540,1541,1543],{},"Where should ",[15,1542,21],{}," be set?","\nOn the root, as ",[15,1546,1547],{},":root { interpolate-size: allow-keywords; }",". The property inherits, so setting it once enables keyword interpolation everywhere. It is opt-in because enabling it globally could change the behaviour of existing transitions that relied on snapping.",[27,1550,1551,1557,1559,1560,1563,1564,1566,1567,1569],{},[1432,1552,1553,1554,1556],{},"What is ",[15,1555,25],{}," for?",[15,1558,25],{}," lets you do arithmetic on an intrinsic size, such as ",[15,1561,1562],{},"calc-size(auto, size + 2rem)",", and it also makes that size interpolable. Use it when you need a modified intrinsic size; use ",[15,1565,21],{}," when a plain ",[15,1568,36],{}," target is enough.",[27,1571,1572,1577,1578,33,1580,1582,1583,1585,1586,1421],{},[1432,1573,1574,1575,1524],{},"What is the fallback for browsers without ",[15,1576,21],{},"\nWrap the content in a grid whose single row transitions from ",[15,1579,1184],{},[15,1581,1188],{},". Fractional track sizes are interpolable everywhere, and a ",[15,1584,1188],{}," row sizes to its content, which gives the same visual effect as animating to ",[15,1587,36],{},[66,1589,1591],{"id":1590},"related","Related",[1593,1594,1595,1601,1606,1613],"ul",{},[1596,1597,1598,1600],"li",{},[55,1599,58],{"href":57}," — the parent guide to discrete and intrinsic-size motion.",[1596,1602,1603,1605],{},[55,1604,1420],{"href":1419}," — the disclosure pattern this animates.",[1596,1607,1608,1612],{},[55,1609,1611],{"href":1610},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransitioning-display-with-allow-discrete\u002F","Transitioning display With allow-discrete"," — the discrete half of the same problem.",[1596,1614,1615,1619],{},[55,1616,1618],{"href":1617},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fmin-max-fit-content-explained\u002F","min-content, max-content and fit-content"," — the intrinsic keywords that become interpolable.",[329,1621,1622],{},"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 .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":213,"searchDepth":237,"depth":237,"links":1624},[1625,1626,1627,1628,1630,1631,1632,1633,1634],{"id":68,"depth":237,"text":69},{"id":187,"depth":237,"text":188},{"id":1054,"depth":237,"text":1055},{"id":1180,"depth":237,"text":1629},"Variation: the grid 0fr → 1fr fallback",{"id":1424,"depth":237,"text":1425},{"id":1472,"depth":237,"text":1473},{"id":1492,"depth":237,"text":1493},{"id":1513,"depth":237,"text":1514},{"id":1590,"depth":237,"text":1591},"Animate to and from height: auto with interpolate-size and calc-size(), open details smoothly via ::details-content, and fall back to the grid 0fr to 1fr trick.","md",{"pageTitle":1638,"datePublished":1639,"dateModified":1639,"faq":1640},"Animating height: auto With interpolate-size","2026-09-18",[1641,1644,1647,1650],{"q":1642,"a":1643},"Why can't CSS transition height to auto?","auto is a keyword, not a length, so the browser historically had no number to interpolate toward. interpolate-size: allow-keywords tells the browser to resolve intrinsic keywords such as auto and fit-content to lengths for interpolation, which makes the transition possible.",{"q":1645,"a":1646},"Where should interpolate-size be set?","On the root, as :root { interpolate-size: allow-keywords; }. The property inherits, so setting it once enables keyword interpolation everywhere. It is opt-in because enabling it globally could change the behaviour of existing transitions that relied on snapping.",{"q":1648,"a":1649},"What is calc-size() for?","calc-size() lets you do arithmetic on an intrinsic size, such as calc-size(auto, size + 2rem), and it also makes that size interpolable. Use it when you need a modified intrinsic size; use interpolate-size when a plain auto target is enough.",{"q":1651,"a":1652},"What is the fallback for browsers without interpolate-size?","Wrap the content in a grid whose single row transitions from 0fr to 1fr. Fractional track sizes are interpolable everywhere, and a 1fr row sizes to its content, which gives the same visual effect as animating to auto.","\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Finterpolate-size-for-height-auto-animation",{"title":5,"description":1635},"css-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Finterpolate-size-for-height-auto-animation\u002Findex","agq3CrfaYHIFu5qfkreTHJgzyoOHb5t7VijVOzbcyjw",[1658,1661,1664,1667,1670,1673,1676,1679,1682,1685,1688,1691,1694,1697,1700,1703,1706,1709,1712,1715,1718,1721,1724,1727,1730,1733,1736,1739,1742,1745,1748,1751,1754,1757,1760,1763,1766,1769,1772,1775,1778,1781,1784,1787,1790,1793,1796,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,1937,1940,1943,1946,1949,1952,1955,1958,1961,1964,1967,1970,1973,1976,1979,1982,1985,1988,1991,1994,1997,2000,2003,2006,2009,2012,2015,2018,2021,2024,2027,2030,2033,2036,2039,2042,2045,2048,2051,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,2195,2198,2201,2204,2207,2210,2213],{"path":1659,"title":1660},"\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":1662,"title":1663},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fflashing-content-and-seizure-thresholds","Flashing Content and Seizure Thresholds",{"path":1665,"title":1666},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fforced-colors-mode-and-animations","Forced Colors Mode and Animations",{"path":1668,"title":1669},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations","Accessibility in CSS Animations: Patterns, Specs & Best Practices",{"path":1671,"title":1672},"\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":1674,"title":1675},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fprefers-reduced-motion-recipes","prefers-reduced-motion Recipes: A Reduction for Every Common Effect",{"path":1677,"title":1678},"\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":1680,"title":1681},"\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":1683,"title":1684},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fvestibular-safe-animation-patterns","Vestibular-Safe Animation Patterns: Why Some Motion Makes People Sick",{"path":1686,"title":1687},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fwcag-motion-success-criteria","WCAG Motion Success Criteria: What Each One Actually Requires",{"path":1689,"title":1690},"\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":1692,"title":1693},"\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":1695,"title":1696},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations","Clip-Path & Mask Animations: Animating Visibility Instead of Position",{"path":1698,"title":1699},"\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":1701,"title":1702},"\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":1704,"title":1705},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fanimating-gradients","Animating CSS Gradients: Smooth Colour Motion Without Jumps",{"path":1707,"title":1708},"\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":1710,"title":1711},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions","Color & Theme Transitions: Colour as Part of the Motion System",{"path":1713,"title":1714},"\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":1716,"title":1717},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fsmooth-theme-switching-transitions","Smooth Theme Switching: Crossfades, Circular Reveals and No Flash",{"path":1719,"title":1720},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fcontainer-query-hover-affordances","Container Query Hover Affordances: When Narrow Means Persistent, Not Hidden",{"path":1722,"title":1723},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion","Container-Aware Motion: Animation Sized by the Space a Component Actually Has",{"path":1725,"title":1726},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Flayout-change-animations-at-container-breakpoints","Animating Changes at Container Breakpoints",{"path":1728,"title":1729},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fmotion-driven-by-container-style-queries","Motion Driven by Container Style Queries",{"path":1731,"title":1732},"\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":1734,"title":1735},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fsuppressing-motion-in-small-containers","Suppressing Motion in Small Containers: Deliberately Animating Nothing",{"path":1737,"title":1738},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fcontrolling-css-animations-from-javascript","Controlling CSS Animations From JavaScript",{"path":1740,"title":1741},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api","CSS Animation vs the Web Animations API: A Decision Guide",{"path":1743,"title":1744},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fwaapi-vs-css-for-interruptible-ui","Interruptible UI: CSS Transitions vs WAAPI",{"path":1746,"title":1747},"\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":1749,"title":1750},"\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":1752,"title":1753},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fcustom-property-fallbacks-and-invalid-values","Custom Property Fallbacks and Invalid Values",{"path":1755,"title":1756},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Ffluid-spacing-tokens-driving-transition-durations","Fluid Spacing Tokens That Drive Transition Durations",{"path":1758,"title":1759},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture","CSS Custom Properties Architecture: Scalable Design Systems & Dynamic UI",{"path":1761,"title":1762},"\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":1764,"title":1765},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fscoping-custom-properties-to-components","Scoping Custom Properties to Components",{"path":1767,"title":1768},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fcss-transition-timing-functions","CSS Transition Timing Functions: ease, cubic-bezier(), steps() and linear()",{"path":1770,"title":1771},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals","CSS Transition Fundamentals: Architecture, Performance & Patterns",{"path":1773,"title":1774},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Finterrupted-and-reversing-transitions","Interrupted and Reversing Transitions: What Happens Mid-Flight",{"path":1776,"title":1777},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fstarting-style-entry-animations","@starting-style: Animating an Element's Very First Style Change",{"path":1779,"title":1780},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-delay-choreography","Choreographing Motion With transition-delay",{"path":1782,"title":1783},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-shorthand-and-multiple-properties","The transition Shorthand and Multiple Properties",{"path":1785,"title":1786},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransitioning-display-with-allow-discrete","Transitioning display with transition-behavior: allow-discrete and @starting-style",{"path":1788,"title":1789},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fanimating-dialog-open-and-close","Animating \u003Cdialog> Open and Close: Both Directions, No Library",{"path":1791,"title":1792},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fbackdrop-animations","Animating ::backdrop: Fades and Blurs Behind Dialogs and Popovers",{"path":1794,"title":1795},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations","Dialog & Popover Animations: Motion for the Top Layer",{"path":1653,"title":5},{"path":1798,"title":1799},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fpopover-entry-and-exit-transitions","Popover Menus That Animate From Their Anchor",{"path":1801,"title":1802},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fchoosing-animation-durations","Choosing Animation Durations: How Long Motion Should Last",{"path":1804,"title":1805},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fcubic-bezier-overshoot-and-anticipation","Overshoot and Anticipation With cubic-bezier(): Motion With Character",{"path":1807,"title":1808},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fentry-vs-exit-easing","Entry vs Exit Easing: Different Curves for Arriving and Leaving",{"path":1810,"title":1811},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design","Easing & Motion Design: Making CSS Motion Feel Intentional",{"path":1813,"title":1814},"\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":1816,"title":1817},"\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":1819,"title":1820},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Faccessible-css-only-tooltips","Accessible CSS-Only Tooltips and Hover Cards With  and ",{"path":1822,"title":1823},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fbutton-press-and-active-states","Button Press and  States",{"path":1825,"title":1826},"\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":1828,"title":1829},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Ffocus-within-form-patterns"," Form Patterns: Styling a Group From the Field Inside It",{"path":1831,"title":1832},"\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":1834,"title":1835},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design","Hover & Focus State Design: Spec-Compliant Patterns for Modern UIs",{"path":1837,"title":1838},"\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":1840,"title":1841},"\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":1843,"title":1844},"\u002Fcss-only-micro-interactions-animations","CSS-Only Micro-Interactions & Animations: Architecture, Performance & Implementation",{"path":1846,"title":1847},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fanimation-composition-and-stacking","Stacking Animations With animation-composition",{"path":1849,"title":1850},"\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":1852,"title":1853},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcontainer-query-triggered-keyframe-animations","Container-Query-Triggered Keyframe Animations: Animate Differently per Available Space",{"path":1855,"title":1856},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-accordions-and-disclosure","CSS-Only Accordions and Disclosure Widgets with details and summary",{"path":1858,"title":1859},"\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":1861,"title":1862},"\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":1864,"title":1865},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns","Keyframe Animation Patterns: Spec-Compliant Architectures for Modern UIs",{"path":1867,"title":1868},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fmulti-step-keyframes-and-per-keyframe-easing","Multi-Step Keyframes and Per-Keyframe Easing",{"path":1870,"title":1871},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fstaggered-list-animations-with-custom-properties","Staggered List Animations Using --i Index Custom Properties",{"path":1873,"title":1874},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fanimating-box-shadow-and-filters-cheaply","Animating box-shadow and Filters Cheaply",{"path":1876,"title":1877},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcontain-property-for-animation-performance","The contain Property for Animation Performance",{"path":1879,"title":1880},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcss-triggers-layout-paint-composite","Layout, Paint and Composite: What Triggers What",{"path":1882,"title":1883},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration","Performance & GPU Acceleration in CSS: A Developer’s Blueprint",{"path":1885,"title":1886},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Foptimizing-css-animations-for-60fps","Optimizing CSS Animations for 60fps: Budgeting the Frame",{"path":1888,"title":1889},"\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":1891,"title":1892},"\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":1894,"title":1895},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations","Scroll-Driven Animations: Binding Motion to Scroll Position in Pure CSS",{"path":1897,"title":1898},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-animation-fallbacks","Shipping Scroll-Driven Animations Without Breaking Anything",{"path":1900,"title":1901},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-parallax-effects","Scroll-Driven Parallax Effects in CSS",{"path":1903,"title":1904},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-progress-bar-without-javascript","A Reading Progress Bar Driven by scroll(root)",{"path":1906,"title":1907},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-triggered-reveal-animations","Reveal-on-Scroll with view() and animation-range",{"path":1909,"title":1910},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Ftimeline-scope-for-cross-element-animations","timeline-scope for Cross-Element Animations",{"path":1912,"title":1913},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fview-timeline-and-animation-range","View Timelines and animation-range",{"path":1915,"title":1916},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fcross-document-view-transitions","Cross-Document View Transitions",{"path":1918,"title":1919},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers","View Transitions for CSS Developers: the Pseudo-Element Tree, Snapshots, and Named Elements",{"path":1921,"title":1922},"\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":1924,"title":1925},"\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":1927,"title":1928},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transition-types-and-classes","View Transition Types and Classes",{"path":1930,"title":1931},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-for-list-reordering","View Transitions for List Reordering",{"path":1933,"title":1934},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-with-reduced-motion","Honouring prefers-reduced-motion in View Transitions",{"path":389,"title":1936},"Modern CSS Layouts & Micro-Interactions",{"path":1938,"title":1939},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioned-tooltips","Anchor-Positioned Tooltips: Tethering, Flipping, and Getting the Semantics Right",{"path":1941,"title":1942},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioning-fallbacks","Anchor Positioning Fallbacks: A Graceful Floor for Older Browser Versions",{"path":1944,"title":1945},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-size-for-matching-widths","anchor-size(): Overlays That Match Their Trigger's Size",{"path":1947,"title":1948},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays","CSS Anchor Positioning and Overlays: Tethering Elements Without JavaScript",{"path":1950,"title":1951},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-attribute-and-css-styling","The popover Attribute: Top-Layer Overlays With No JavaScript",{"path":1953,"title":1954},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-light-dismiss-and-stacking","Popover Light Dismiss, Nesting and Stacking",{"path":1956,"title":1957},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fposition-area-grid-explained","position-area: The Anchor Placement Grid",{"path":1959,"title":1960},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fcontainer-query-polyfill-tradeoffs","Container Query Polyfills: What They Cost and When to Skip Them",{"path":1962,"title":1963},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ffeature-detection-with-supports","Feature Detection with @supports: Syntax, Semantics, and the Traps",{"path":1965,"title":1966},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fhandling-container-query-fallbacks-for-older-browsers","Handling Container Query Fallbacks for Older Browsers",{"path":1968,"title":1969},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks","Container Query Fallbacks: Spec-Compliant CSS Strategies for Legacy Browsers",{"path":1971,"title":1972},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fintrinsic-layout-fallbacks-without-queries","Intrinsic Layout Fallbacks: Baselines That Adapt Without Any Query",{"path":1974,"title":1975},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ftesting-fallbacks-without-old-browsers","Testing CSS Fallbacks Without an Old Browser",{"path":1977,"title":1978},"\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":1980,"title":1981},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-query-range-and-logic-operators","Container Query Range Syntax and Logic Operators",{"path":1983,"title":1984},"\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":1986,"title":1987},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-type-size-vs-inline-size","Choosing container-type: inline-size, size, or normal",{"path":1989,"title":1990},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-vs-media-queries-comparison","Container vs Media Queries: Choosing the Right Reference Box",{"path":1992,"title":1993},"\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":1995,"title":1996},"\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":1998,"title":1999},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics","Container Query Syntax Basics",{"path":2001,"title":2002},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fnesting-and-naming-container-queries","Nesting and Naming Container Queries: Targeting the Right Ancestor",{"path":2004,"title":2005},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fauto-fit-minmax-responsive-grids","Responsive Grids with repeat(auto-fit, minmax())",{"path":2007,"title":2008},"\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":2010,"title":2011},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fgrid-auto-flow-dense-packing","grid-auto-flow: dense for Packed Layouts",{"path":2013,"title":2014},"\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":2016,"title":2017},"\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":2019,"title":2020},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts","CSS Grid and Subgrid Layouts for Responsive Interfaces",{"path":2022,"title":2023},"\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":2025,"title":2026},"\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":2028,"title":2029},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fsubgrid-vs-nested-grid","Subgrid vs an Independently Nested Grid",{"path":2031,"title":2032},"\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":2034,"title":2035},"\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":2037,"title":2038},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-grow-and-flex-shrink-explained","flex-grow and flex-shrink Explained",{"path":2040,"title":2041},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-wrap-intrinsic-responsive-rows","Breakpoint-Free Responsive Rows With flex-wrap and flex-basis",{"path":2043,"title":2044},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflexbox-gap-and-spacing","Flexbox gap vs Margins: Spacing Items Without Edge Hacks",{"path":2046,"title":2047},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns","Flexbox Layout Patterns: One-Dimensional Layout for Real Components",{"path":2049,"title":2050},"\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":2052,"title":2053},"\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":2055,"title":2056},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fdebugging-clamp-values","Debugging clamp(): Values That Are Ignored, Stuck or Never Fluid",{"path":2058,"title":2059},"\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":2061,"title":2062},"\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":2064,"title":2065},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-type-accessibility-and-zoom","Fluid Type, Accessibility and Zoom: The vw-Only Trap",{"path":2067,"title":2068},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-typography-without-javascript","Fluid Typography Without JavaScript: A Precision CSS Reference",{"path":2070,"title":2071},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp","Fluid Typography with clamp(): A Practical Guide for Modern CSS",{"path":2073,"title":2074},"\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":2076,"title":2077},"\u002Fmastering-container-queries-responsive-layouts","Mastering Container Queries & Responsive Layouts",{"path":2079,"title":2080},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Faspect-ratio-for-responsive-media","Using aspect-ratio for Responsive Media and Preventing Layout Shift",{"path":2082,"title":2083},"\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":2085,"title":2086},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques","Intrinsic Sizing Techniques: Modern CSS Layouts for Responsive UI",{"path":2088,"title":2089},"\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":2091,"title":2092},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fmin-max-fit-content-explained","min-content, max-content, and fit-content() Explained",{"path":2094,"title":2095},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fobject-fit-and-object-position","object-fit and object-position: Images That Fit Any Box",{"path":2097,"title":2098},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fpreventing-flex-and-grid-overflow","The min-width: auto Trap in Flex and Grid Layouts",{"path":2100,"title":2101},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-for-reset-and-tokens","Cascade Layers for Reset and Design Tokens",{"path":2103,"title":2104},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-vs-specificity-hacks","Cascade Layers vs Specificity Hacks: Ordering Instead of Escalating",{"path":2106,"title":2107},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcss-scope-for-component-styles","@scope for Component Styles: Short Selectors That Cannot Leak",{"path":2109,"title":2110},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies","Modern CSS Reset Strategies: A Spec-Compliant Foundation",{"path":2112,"title":2113},"\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":2115,"title":2116},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fwriting-a-minimal-modern-reset","Writing a Minimal Modern CSS Reset: Every Line Justified",{"path":2118,"title":2119},"\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":2121,"title":2122},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fempty-and-loading-states-with-has","Empty and Loading States With ()",{"path":2124,"title":2125},"\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":2127,"title":2128},"\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":2130,"title":2131},"\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":2133,"title":2134},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has","Parent-Aware Layouts With :has(): Letting Containers React to Their Contents",{"path":2136,"title":2137},"\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":2139,"title":2140},"\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":2142,"title":2143},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-data-tables","Container Query Data Tables: Reflowing Tables to Cards",{"path":2145,"title":2146},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-sidebar-layouts","Container Query Sidebar Layouts That Travel Between Contexts",{"path":2148,"title":2149},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns","Responsive Component Patterns: Architecture & Implementation",{"path":2151,"title":2152},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-forms-with-container-queries","Responsive Forms with Container Queries: Reflow Without Losing the Wiring",{"path":2154,"title":2155},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-hero-sections-with-container-queries","Responsive Hero Sections With Container Queries",{"path":2157,"title":2158},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-navigation-without-media-queries","Responsive Navigation Without Media Queries Using Container Queries",{"path":2160,"title":2161},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-pricing-tables","Responsive Pricing Tables: Aligned Features, a Clear Recommendation, Any Width",{"path":2163,"title":2164},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Ftabs-that-become-accordions","Tabs That Become an Accordion: One Component, Two Layouts",{"path":2166,"title":2167},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fcss-only-carousel-with-scroll-snap","A CSS-Only Carousel With Scroll Snap",{"path":2169,"title":2170},"\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":2172,"title":2173},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts","Scroll Snap & Overflow Layouts: Designing Components That Scroll on Purpose",{"path":2175,"title":2176},"\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":2178,"title":2179},"\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":2181,"title":2182},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fcombining-size-and-style-queries","Combining Size and Style Container Queries",{"path":2184,"title":2185},"\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":2187,"title":2188},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state","Style Queries and Container State: Token-Driven Component Variants",{"path":2190,"title":2191},"\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":2193,"title":2194},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fstyle-query-component-variants","Component Variants With Style Queries: One Token, Many Looks",{"path":2196,"title":2197},"\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":2199,"title":2200},"\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":2202,"title":2203},"\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":2205,"title":2206},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout","Viewport Units & Mobile Layout: Designing for the Screen You Actually Get",{"path":2208,"title":2209},"\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":2211,"title":2212},"\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":2214,"title":2215},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Fvirtual-keyboard-and-interactive-widget","Layouts That Survive the Virtual Keyboard",{"title":2217,"caption":2218,"height":2219,"html":2220,"css":2221},"details panels that animate to their natural height","Open and close each question: in Chromium the panel grows to its real height; elsewhere it opens instantly, still fully usable.",300,"\n\u003Cdiv class=\"faq\">\n  \u003Cdetails>\n    \u003Csummary>What is included in the plan?\u003C\u002Fsummary>\n    \u003Cdiv class=\"panel\">\u003Cp>Unlimited projects, five collaborators and daily backups.\u003C\u002Fp>\u003C\u002Fdiv>\n  \u003C\u002Fdetails>\n  \u003Cdetails>\n    \u003Csummary>Can I change plans later?\u003C\u002Fsummary>\n    \u003Cdiv class=\"panel\">\u003Cp>Yes. Upgrades apply immediately; downgrades apply at the next billing date.\u003C\u002Fp>\u003C\u002Fdiv>\n  \u003C\u002Fdetails>\n\u003C\u002Fdiv>","\n:root { interpolate-size: allow-keywords; }\nbody { place-items: start stretch; }\n.faq { width: 100%; max-width: 36rem; margin: 0 auto; }\ndetails { border: 1px solid var(--demo-border); border-radius: 10px; margin-block-end: 0.75rem; }\nsummary { padding: 0.75rem 1rem; cursor: pointer; font-weight: 600; }\nsummary:focus-visible { outline: 2px solid var(--demo-accent); outline-offset: 2px; border-radius: 10px; }\ndetails::details-content {\n  block-size: 0;\n  overflow: clip;\n  transition: block-size 300ms cubic-bezier(0.22, 1, 0.36, 1), content-visibility 300ms allow-discrete;\n}\ndetails[open]::details-content { block-size: auto; }\n.panel { padding: 0 1rem 1rem; }\n.panel p { margin: 0; }\n@media (prefers-reduced-motion: reduce) { details::details-content { transition: none; } }",1789717746826]