[{"data":1,"prerenderedAt":1895},["ShallowReactive",2],{"page-\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fdebugging-clamp-values":3,"content-all-pages":1331,"live-demo:clamp-sweep":1889},{"id":4,"title":5,"body":6,"description":1310,"extension":1311,"meta":1312,"navigation":371,"path":1327,"seo":1328,"stem":1329,"__hash__":1330},"content\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fdebugging-clamp-values\u002Findex.md","Debugging clamp(): Values That Are Ignored, Stuck or Never Fluid",{"type":7,"value":8,"toc":1299},"minimark",[9,19,39,47,62,80,177,183,187,190,1007,1025,1029,1052,1105,1111,1115,1123,1127,1145,1149,1195,1199,1214,1218,1232,1245,1251,1263,1267,1296],[10,11,13,14,18],"h1",{"id":12},"debugging-clamp-values-that-are-ignored-stuck-or-never-fluid","Debugging ",[15,16,17],"code",{},"clamp()",": Values That Are Ignored, Stuck or Never Fluid",[20,21,22,24,25,27,28,33,34,38],"p",{},[15,23,17],{}," looks simple — a minimum, a preferred value, a maximum — and most of the time it behaves. When it does not, it fails quietly: the declaration is dropped, or the value sits at one bound at every width, or the \"fluid\" size turns out to change by half a pixel across the whole range of real devices. None of these produce an error in the console. The narrow problem this page solves is diagnosing those failures quickly, with a mental model of how ",[15,26,17],{}," resolves, a checklist of the classic mistakes, and a DevTools workflow for watching the value change. It belongs to ",[29,30,32],"a",{"href":31},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002F","Fluid Typography With clamp()"," in the ",[29,35,37],{"href":36},"\u002Fmastering-container-queries-responsive-layouts\u002F","Mastering Container Queries & Responsive Layouts"," guide.",[40,41,43,44,46],"h2",{"id":42},"how-clamp-actually-resolves","How ",[15,45,17],{}," actually resolves",[20,48,49,52,53,56,57,61],{},[15,50,51],{},"clamp(MIN, VAL, MAX)"," is defined as ",[15,54,55],{},"max(MIN, min(VAL, MAX))",". Reading it in that order explains most surprises. First the preferred value is capped at the maximum; then the result is raised to at least the minimum. The minimum is applied ",[58,59,60],"em",{},"last",", so it always wins a conflict.",[20,63,64,65,68,69,72,73,75,76,79],{},"Each of the three arguments is a calculation in its own right and is resolved at computed-value time against the element's context: ",[15,66,67],{},"vw"," against the viewport, ",[15,70,71],{},"cqi"," against the container, ",[15,74,58],{}," against the element's font size, ",[15,77,78],{},"rem"," against the root, and percentages against whatever that property's percentage basis is. The three results must all be of the same type — all lengths, all numbers, all percentages that resolve to lengths — or the expression is invalid.",[81,82,88,89,88,93,88,97,88,105,88,114,88,117,88,123,88,132,88,138,88,142,88,148,88,153,88,159,88,164,88,169,88,172],"svg",{"viewBox":83,"role":84,"ariaLabel":85,"xmlns":86,"style":87},"0 0 720 320","img","Graph of clamp output against viewport width: flat at MIN, rising with the preferred value, flat at MAX, with the two crossover widths marked","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","width:100%;height:auto;max-width:720px;margin:2rem 0","\n  ",[90,91,92],"title",{},"The shape of a clamp() value",[94,95,96],"desc",{},"The output is constant at the minimum up to the first crossover width, rises along the preferred value's line between the two crossovers, and is constant at the maximum after the second crossover. If both crossovers fall outside the range of real screen widths, the value never visibly changes.",[98,99,104],"text",{"textAnchor":100,"x":101,"y":102,"style":103},"middle","360","26","text-anchor:middle;fill:currentColor;font:700 17px sans-serif","clamp(MIN, VAL, MAX) across widths",[106,107],"line",{"x1":108,"y1":109,"x2":110,"y2":109,"stroke":111,"strokeWidth":112,"opacity":113},"80","260","670","currentColor","1.5","0.6",[106,115],{"x1":108,"y1":116,"x2":108,"y2":109,"stroke":111,"strokeWidth":112,"opacity":113},"50",[98,118,122],{"textAnchor":119,"x":110,"y":120,"style":121},"end","284","text-anchor:end;fill:currentColor;font:12px sans-serif","viewport or container width",[124,125],"path",{"d":126,"fill":127,"stroke":111,"strokeWidth":112,"strokeDashArray":128,"opacity":131},"M120 240 L640 70","none",[129,130],"5","4","0.5",[98,133,137],{"textAnchor":119,"x":134,"y":135,"style":136},"640","62","text-anchor:end;fill:currentColor;font:11px ui-monospace,monospace","VAL alone",[124,139],{"d":140,"fill":127,"stroke":141,"strokeWidth":130},"M80 200 H240 L480 120 H670","#7aa2ff",[98,143,147],{"textAnchor":100,"x":144,"y":145,"style":146},"160","190","text-anchor:middle;fill:currentColor;font:12px ui-monospace,monospace","MIN",[98,149,152],{"textAnchor":100,"x":150,"y":151,"style":146},"580","110","MAX",[106,154],{"x1":155,"y1":156,"x2":155,"y2":109,"stroke":111,"strokeDashArray":157,"opacity":113},"240","200",[158,158],"3",[106,160],{"x1":161,"y1":162,"x2":161,"y2":109,"stroke":111,"strokeDashArray":163,"opacity":113},"480","120",[158,158],[98,165,168],{"textAnchor":100,"x":155,"y":166,"style":167},"280","text-anchor:middle;fill:currentColor;font:11px sans-serif","VAL = MIN",[98,170,171],{"textAnchor":100,"x":161,"y":166,"style":167},"VAL = MAX",[98,173,176],{"textAnchor":100,"x":101,"y":174,"style":175},"306","text-anchor:middle;fill:currentColor;font:12px sans-serif","The fluid range is only the stretch between the two crossover widths.",[20,178,179,180,182],{},"The graph is the most useful debugging tool on this page. A ",[15,181,17],{}," value is fluid only between two crossover widths: where the preferred value equals the minimum, and where it equals the maximum. Outside that stretch it is a constant. Every \"my clamp does not work\" report is a question about where those crossovers are, or whether the expression is valid at all.",[40,184,186],{"id":185},"the-complete-implementation-five-broken-declarations","The complete implementation: five broken declarations",[20,188,189],{},"Each rule below contains one classic mistake, with the diagnosis and fix beside it.",[191,192,197],"pre",{"className":193,"code":194,"language":195,"meta":196,"style":196},"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>Broken clamp() values\u003C\u002Ftitle>\n\u003Cstyle>\n  body { font: 16px\u002F1.5 system-ui, sans-serif; margin: 1.5rem; }\n\n  \u002F* 1. MIN larger than MAX. Valid, but always 3rem: the minimum is\n        applied last. FIX: swap the bounds. *\u002F\n  .a { font-size: clamp(3rem, 5vw, 2rem); }\n  .a-fixed { font-size: clamp(2rem, 5vw, 3rem); }\n\n  \u002F* 2. Mixed types. A length and a unitless number cannot be compared,\n        so the whole declaration is INVALID and dropped. FIX: give every\n        argument the same type. *\u002F\n  .b { padding: clamp(1rem, 2vw, 3); }\n  .b-fixed { padding: clamp(1rem, 2vw, 3rem); }\n\n  \u002F* 3. Crossovers outside real screens. 1rem + 0.1vw only reaches 1.2rem\n        at a 3200px viewport, so on every real screen the value sits near\n        the minimum. FIX: steepen the slope so the crossovers land between\n        roughly 360px and 1280px. *\u002F\n  .c { font-size: clamp(1rem, 1rem + 0.1vw, 1.2rem); }\n  .c-fixed { font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem); }\n\n  \u002F* 4. A custom property that is invalid at computed-value time. --gap is\n        \"large\", not a length, so clamp() becomes invalid when computed and\n        the property falls back to its INITIAL value (0 for gap), not the\n        previous declaration. FIX: store lengths in the token. *\u002F\n  .d { --gap: large; gap: clamp(0.5rem, var(--gap), 2rem); }\n  .d-fixed { --gap: 3vw; gap: clamp(0.5rem, var(--gap), 2rem); }\n\n  \u002F* 5. Dividing lengths. (100vw - 20rem) \u002F 60rem is length ÷ length,\n        which calc() rejects. FIX: multiply by a number instead, or use\n        tan(atan2()) to obtain a ratio. *\u002F\n  .e { font-size: clamp(1rem, 1rem + (100vw - 20rem) \u002F 60rem * 1rem, 2rem); }\n  .e-fixed { font-size: clamp(1rem, 0.667rem + 1.667vw, 2rem); }\n\u003C\u002Fstyle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cp class=\"a\">Always 3rem\u003C\u002Fp>\n  \u003Cp class=\"a-fixed\">Fluid 2–3rem\u003C\u002Fp>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n","html","",[15,198,199,218,238,248,266,291,305,315,366,373,380,386,425,459,464,470,476,482,516,550,555,561,567,573,579,623,665,670,676,682,688,694,743,789,794,800,806,812,874,916,926,935,945,968,989,998],{"__ignoreMap":196},[200,201,203,207,211,215],"span",{"class":106,"line":202},1,[200,204,206],{"class":205},"suds8","\u003C!",[200,208,210],{"class":209},"sne4z","doctype",[200,212,214],{"class":213},"s-5SL"," html",[200,216,217],{"class":205},">\n",[200,219,221,224,226,229,232,236],{"class":106,"line":220},2,[200,222,223],{"class":205},"\u003C",[200,225,195],{"class":209},[200,227,228],{"class":213}," lang",[200,230,231],{"class":205},"=",[200,233,235],{"class":234},"sT6z2","\"en\"",[200,237,217],{"class":205},[200,239,241,243,246],{"class":106,"line":240},3,[200,242,223],{"class":205},[200,244,245],{"class":209},"head",[200,247,217],{"class":205},[200,249,251,253,256,259,261,264],{"class":106,"line":250},4,[200,252,223],{"class":205},[200,254,255],{"class":209},"meta",[200,257,258],{"class":213}," charset",[200,260,231],{"class":205},[200,262,263],{"class":234},"\"utf-8\"",[200,265,217],{"class":205},[200,267,269,271,273,276,278,281,284,286,289],{"class":106,"line":268},5,[200,270,223],{"class":205},[200,272,255],{"class":209},[200,274,275],{"class":213}," name",[200,277,231],{"class":205},[200,279,280],{"class":234},"\"viewport\"",[200,282,283],{"class":213}," content",[200,285,231],{"class":205},[200,287,288],{"class":234},"\"width=device-width, initial-scale=1\"",[200,290,217],{"class":205},[200,292,294,296,298,301,303],{"class":106,"line":293},6,[200,295,223],{"class":205},[200,297,90],{"class":209},[200,299,300],{"class":205},">Broken clamp() values\u003C\u002F",[200,302,90],{"class":209},[200,304,217],{"class":205},[200,306,308,310,313],{"class":106,"line":307},7,[200,309,223],{"class":205},[200,311,312],{"class":209},"style",[200,314,217],{"class":205},[200,316,318,321,324,327,330,333,337,340,342,345,348,351,354,357,359,361,363],{"class":106,"line":317},8,[200,319,320],{"class":209},"  body",[200,322,323],{"class":205}," { ",[200,325,326],{"class":213},"font",[200,328,329],{"class":205},": ",[200,331,332],{"class":213},"16",[200,334,336],{"class":335},"sHUrx","px",[200,338,339],{"class":205},"\u002F",[200,341,112],{"class":213},[200,343,344],{"class":213}," system-ui",[200,346,347],{"class":205},", ",[200,349,350],{"class":213},"sans-serif",[200,352,353],{"class":205},"; ",[200,355,356],{"class":213},"margin",[200,358,329],{"class":205},[200,360,112],{"class":213},[200,362,78],{"class":335},[200,364,365],{"class":205},"; }\n",[200,367,369],{"class":106,"line":368},9,[200,370,372],{"emptyLinePlaceholder":371},true,"\n",[200,374,376],{"class":106,"line":375},10,[200,377,379],{"class":378},"sLBg1","  \u002F* 1. MIN larger than MAX. Valid, but always 3rem: the minimum is\n",[200,381,383],{"class":106,"line":382},11,[200,384,385],{"class":378},"        applied last. FIX: swap the bounds. *\u002F\n",[200,387,389,392,394,397,399,402,405,407,409,411,413,415,417,420,422],{"class":106,"line":388},12,[200,390,391],{"class":213},"  .a",[200,393,323],{"class":205},[200,395,396],{"class":213},"font-size",[200,398,329],{"class":205},[200,400,401],{"class":213},"clamp",[200,403,404],{"class":205},"(",[200,406,158],{"class":213},[200,408,78],{"class":335},[200,410,347],{"class":205},[200,412,129],{"class":213},[200,414,67],{"class":335},[200,416,347],{"class":205},[200,418,419],{"class":213},"2",[200,421,78],{"class":335},[200,423,424],{"class":205},"); }\n",[200,426,428,431,433,435,437,439,441,443,445,447,449,451,453,455,457],{"class":106,"line":427},13,[200,429,430],{"class":213},"  .a-fixed",[200,432,323],{"class":205},[200,434,396],{"class":213},[200,436,329],{"class":205},[200,438,401],{"class":213},[200,440,404],{"class":205},[200,442,419],{"class":213},[200,444,78],{"class":335},[200,446,347],{"class":205},[200,448,129],{"class":213},[200,450,67],{"class":335},[200,452,347],{"class":205},[200,454,158],{"class":213},[200,456,78],{"class":335},[200,458,424],{"class":205},[200,460,462],{"class":106,"line":461},14,[200,463,372],{"emptyLinePlaceholder":371},[200,465,467],{"class":106,"line":466},15,[200,468,469],{"class":378},"  \u002F* 2. Mixed types. A length and a unitless number cannot be compared,\n",[200,471,473],{"class":106,"line":472},16,[200,474,475],{"class":378},"        so the whole declaration is INVALID and dropped. FIX: give every\n",[200,477,479],{"class":106,"line":478},17,[200,480,481],{"class":378},"        argument the same type. *\u002F\n",[200,483,485,488,490,493,495,497,499,502,504,506,508,510,512,514],{"class":106,"line":484},18,[200,486,487],{"class":213},"  .b",[200,489,323],{"class":205},[200,491,492],{"class":213},"padding",[200,494,329],{"class":205},[200,496,401],{"class":213},[200,498,404],{"class":205},[200,500,501],{"class":213},"1",[200,503,78],{"class":335},[200,505,347],{"class":205},[200,507,419],{"class":213},[200,509,67],{"class":335},[200,511,347],{"class":205},[200,513,158],{"class":213},[200,515,424],{"class":205},[200,517,519,522,524,526,528,530,532,534,536,538,540,542,544,546,548],{"class":106,"line":518},19,[200,520,521],{"class":213},"  .b-fixed",[200,523,323],{"class":205},[200,525,492],{"class":213},[200,527,329],{"class":205},[200,529,401],{"class":213},[200,531,404],{"class":205},[200,533,501],{"class":213},[200,535,78],{"class":335},[200,537,347],{"class":205},[200,539,419],{"class":213},[200,541,67],{"class":335},[200,543,347],{"class":205},[200,545,158],{"class":213},[200,547,78],{"class":335},[200,549,424],{"class":205},[200,551,553],{"class":106,"line":552},20,[200,554,372],{"emptyLinePlaceholder":371},[200,556,558],{"class":106,"line":557},21,[200,559,560],{"class":378},"  \u002F* 3. Crossovers outside real screens. 1rem + 0.1vw only reaches 1.2rem\n",[200,562,564],{"class":106,"line":563},22,[200,565,566],{"class":378},"        at a 3200px viewport, so on every real screen the value sits near\n",[200,568,570],{"class":106,"line":569},23,[200,571,572],{"class":378},"        the minimum. FIX: steepen the slope so the crossovers land between\n",[200,574,576],{"class":106,"line":575},24,[200,577,578],{"class":378},"        roughly 360px and 1280px. *\u002F\n",[200,580,582,585,587,589,591,593,595,597,599,601,603,605,609,612,614,616,619,621],{"class":106,"line":581},25,[200,583,584],{"class":213},"  .c",[200,586,323],{"class":205},[200,588,396],{"class":213},[200,590,329],{"class":205},[200,592,401],{"class":213},[200,594,404],{"class":205},[200,596,501],{"class":213},[200,598,78],{"class":335},[200,600,347],{"class":205},[200,602,501],{"class":213},[200,604,78],{"class":335},[200,606,608],{"class":607},"soyes"," +",[200,610,611],{"class":213}," 0.1",[200,613,67],{"class":335},[200,615,347],{"class":205},[200,617,618],{"class":213},"1.2",[200,620,78],{"class":335},[200,622,424],{"class":205},[200,624,626,629,631,633,635,637,639,641,643,645,648,650,652,655,657,659,661,663],{"class":106,"line":625},26,[200,627,628],{"class":213},"  .c-fixed",[200,630,323],{"class":205},[200,632,396],{"class":213},[200,634,329],{"class":205},[200,636,401],{"class":213},[200,638,404],{"class":205},[200,640,501],{"class":213},[200,642,78],{"class":335},[200,644,347],{"class":205},[200,646,647],{"class":213},"0.9",[200,649,78],{"class":335},[200,651,608],{"class":607},[200,653,654],{"class":213}," 0.4",[200,656,67],{"class":335},[200,658,347],{"class":205},[200,660,618],{"class":213},[200,662,78],{"class":335},[200,664,424],{"class":205},[200,666,668],{"class":106,"line":667},27,[200,669,372],{"emptyLinePlaceholder":371},[200,671,673],{"class":106,"line":672},28,[200,674,675],{"class":378},"  \u002F* 4. A custom property that is invalid at computed-value time. --gap is\n",[200,677,679],{"class":106,"line":678},29,[200,680,681],{"class":378},"        \"large\", not a length, so clamp() becomes invalid when computed and\n",[200,683,685],{"class":106,"line":684},30,[200,686,687],{"class":378},"        the property falls back to its INITIAL value (0 for gap), not the\n",[200,689,691],{"class":106,"line":690},31,[200,692,693],{"class":378},"        previous declaration. FIX: store lengths in the token. *\u002F\n",[200,695,697,700,702,705,707,710,712,715,717,719,721,723,725,727,730,732,734,737,739,741],{"class":106,"line":696},32,[200,698,699],{"class":213},"  .d",[200,701,323],{"class":205},[200,703,704],{"class":607},"--gap",[200,706,329],{"class":205},[200,708,709],{"class":213},"large",[200,711,353],{"class":205},[200,713,714],{"class":213},"gap",[200,716,329],{"class":205},[200,718,401],{"class":213},[200,720,404],{"class":205},[200,722,131],{"class":213},[200,724,78],{"class":335},[200,726,347],{"class":205},[200,728,729],{"class":213},"var",[200,731,404],{"class":205},[200,733,704],{"class":607},[200,735,736],{"class":205},"), ",[200,738,419],{"class":213},[200,740,78],{"class":335},[200,742,424],{"class":205},[200,744,746,749,751,753,755,757,759,761,763,765,767,769,771,773,775,777,779,781,783,785,787],{"class":106,"line":745},33,[200,747,748],{"class":213},"  .d-fixed",[200,750,323],{"class":205},[200,752,704],{"class":607},[200,754,329],{"class":205},[200,756,158],{"class":213},[200,758,67],{"class":335},[200,760,353],{"class":205},[200,762,714],{"class":213},[200,764,329],{"class":205},[200,766,401],{"class":213},[200,768,404],{"class":205},[200,770,131],{"class":213},[200,772,78],{"class":335},[200,774,347],{"class":205},[200,776,729],{"class":213},[200,778,404],{"class":205},[200,780,704],{"class":607},[200,782,736],{"class":205},[200,784,419],{"class":213},[200,786,78],{"class":335},[200,788,424],{"class":205},[200,790,792],{"class":106,"line":791},34,[200,793,372],{"emptyLinePlaceholder":371},[200,795,797],{"class":106,"line":796},35,[200,798,799],{"class":378},"  \u002F* 5. Dividing lengths. (100vw - 20rem) \u002F 60rem is length ÷ length,\n",[200,801,803],{"class":106,"line":802},36,[200,804,805],{"class":378},"        which calc() rejects. FIX: multiply by a number instead, or use\n",[200,807,809],{"class":106,"line":808},37,[200,810,811],{"class":378},"        tan(atan2()) to obtain a ratio. *\u002F\n",[200,813,815,818,820,822,824,826,828,830,832,834,836,838,840,843,846,849,851,854,857,859,862,864,866,868,870,872],{"class":106,"line":814},38,[200,816,817],{"class":213},"  .e",[200,819,323],{"class":205},[200,821,396],{"class":213},[200,823,329],{"class":205},[200,825,401],{"class":213},[200,827,404],{"class":205},[200,829,501],{"class":213},[200,831,78],{"class":335},[200,833,347],{"class":205},[200,835,501],{"class":213},[200,837,78],{"class":335},[200,839,608],{"class":607},[200,841,842],{"class":607}," (100vw",[200,844,845],{"class":607}," -",[200,847,848],{"class":213}," 20",[200,850,78],{"class":335},[200,852,853],{"class":205},") \u002F ",[200,855,856],{"class":213},"60",[200,858,78],{"class":335},[200,860,861],{"class":205}," * ",[200,863,501],{"class":213},[200,865,78],{"class":335},[200,867,347],{"class":205},[200,869,419],{"class":213},[200,871,78],{"class":335},[200,873,424],{"class":205},[200,875,877,880,882,884,886,888,890,892,894,896,899,901,903,906,908,910,912,914],{"class":106,"line":876},39,[200,878,879],{"class":213},"  .e-fixed",[200,881,323],{"class":205},[200,883,396],{"class":213},[200,885,329],{"class":205},[200,887,401],{"class":213},[200,889,404],{"class":205},[200,891,501],{"class":213},[200,893,78],{"class":335},[200,895,347],{"class":205},[200,897,898],{"class":213},"0.667",[200,900,78],{"class":335},[200,902,608],{"class":607},[200,904,905],{"class":213}," 1.667",[200,907,67],{"class":335},[200,909,347],{"class":205},[200,911,419],{"class":213},[200,913,78],{"class":335},[200,915,424],{"class":205},[200,917,919,922,924],{"class":106,"line":918},40,[200,920,921],{"class":205},"\u003C\u002F",[200,923,312],{"class":209},[200,925,217],{"class":205},[200,927,929,931,933],{"class":106,"line":928},41,[200,930,921],{"class":205},[200,932,245],{"class":209},[200,934,217],{"class":205},[200,936,938,940,943],{"class":106,"line":937},42,[200,939,223],{"class":205},[200,941,942],{"class":209},"body",[200,944,217],{"class":205},[200,946,948,951,953,956,958,961,964,966],{"class":106,"line":947},43,[200,949,950],{"class":205},"  \u003C",[200,952,20],{"class":209},[200,954,955],{"class":213}," class",[200,957,231],{"class":205},[200,959,960],{"class":234},"\"a\"",[200,962,963],{"class":205},">Always 3rem\u003C\u002F",[200,965,20],{"class":209},[200,967,217],{"class":205},[200,969,971,973,975,977,979,982,985,987],{"class":106,"line":970},44,[200,972,950],{"class":205},[200,974,20],{"class":209},[200,976,955],{"class":213},[200,978,231],{"class":205},[200,980,981],{"class":234},"\"a-fixed\"",[200,983,984],{"class":205},">Fluid 2–3rem\u003C\u002F",[200,986,20],{"class":209},[200,988,217],{"class":205},[200,990,992,994,996],{"class":106,"line":991},45,[200,993,921],{"class":205},[200,995,942],{"class":209},[200,997,217],{"class":205},[200,999,1001,1003,1005],{"class":106,"line":1000},46,[200,1002,921],{"class":205},[200,1004,195],{"class":209},[200,1006,217],{"class":205},[20,1008,1009,1010,1013,1014,1017,1018,1021,1022,1024],{},"Case 4 deserves attention because its failure mode differs from the others. A declaration that is invalid at ",[58,1011,1012],{},"parse"," time — cases 2 and 5 — is simply discarded, so an earlier declaration for the same property still applies. A declaration that only becomes invalid at ",[58,1015,1016],{},"computed-value"," time — because a ",[15,1019,1020],{},"var()"," substituted something unusable — is not discarded; it computes to the property's initial value or, for inherited properties, the inherited value. A fallback declaration written earlier in the rule does not rescue it. That is why a bad token can reset ",[15,1023,714],{}," to zero even though the stylesheet looks like it has a sensible value.",[40,1026,1028],{"id":1027},"the-key-technique-find-the-crossover-widths","The key technique: find the crossover widths",[20,1030,1031,1032,1035,1036,1039,1040,1043,1044,1047,1048,1051],{},"When a value is valid but \"not fluid\", compute the two widths where the preferred value meets each bound. For a preferred value of the form ",[15,1033,1034],{},"A + B·vw",", solve ",[15,1037,1038],{},"A + B·(w\u002F100) = MIN"," and ",[15,1041,1042],{},"A + B·(w\u002F100) = MAX"," for ",[15,1045,1046],{},"w",". With ",[15,1049,1050],{},"clamp(1rem, 0.9rem + 0.4vw, 1.2rem)"," at a 16-pixel root:",[81,1053,88,1056,88,1059,88,1062,88,1064,88,1070,88,1075,88,1080,88,1085,88,1090,88,1093,88,1097,88,1100],{"viewBox":1054,"role":84,"ariaLabel":1055,"xmlns":86,"style":87},"0 0 720 260","Worked calculation of the two crossover widths for clamp of 1rem, 0.9rem plus 0.4vw, 1.2rem",[90,1057,1058],{},"Crossover arithmetic for one clamp() value",[94,1060,1061],{},"The preferred value equals the 16 pixel minimum when 14.4 plus 0.004 times the width equals 16, at a width of 400 pixels. It equals the 19.2 pixel maximum at a width of 1200 pixels. Between 400 and 1200 pixels the size is fluid.",[98,1063,1050],{"textAnchor":100,"x":101,"y":102,"style":103},[1065,1066],"rect",{"x":1067,"y":116,"width":134,"height":1068,"rx":1069,"fill":127,"stroke":111,"strokeWidth":112,"opacity":131},"40","46","8",[98,1071,1074],{"textAnchor":100,"x":101,"y":1072,"style":1073},"79","text-anchor:middle;fill:currentColor;font:13px ui-monospace,monospace","VAL(w) = 14.4px + 0.004 × w",[1065,1076],{"x":1067,"y":151,"width":1077,"height":1078,"rx":1069,"fill":141,"opacity":1079},"310","70","0.2",[98,1081,1084],{"textAnchor":100,"x":1082,"y":1083,"style":146},"195","136","14.4 + 0.004w = 16",[98,1086,1089],{"textAnchor":100,"x":1082,"y":1087,"style":1088},"162","text-anchor:middle;fill:currentColor;font:600 13px sans-serif","w = 400px",[1065,1091],{"x":1092,"y":151,"width":1077,"height":1078,"rx":1069,"fill":141,"opacity":1079},"370",[98,1094,1096],{"textAnchor":100,"x":1095,"y":1083,"style":146},"525","14.4 + 0.004w = 19.2",[98,1098,1099],{"textAnchor":100,"x":1095,"y":1087,"style":1088},"w = 1200px",[98,1101,1104],{"textAnchor":100,"x":101,"y":1102,"style":1103},"220","text-anchor:middle;fill:currentColor;font:13px sans-serif","Fluid from 400px to 1200px: a sensible range for real screens.",[20,1106,1107,1108,1110],{},"The demo makes the crossovers visible. Both bars use ",[15,1109,17],{}," for their width; the solid one has a steep preferred value and visibly moves through all three phases as the frame is resized, while the dashed one has a preferred value so shallow that it barely leaves its minimum at any realistic width.",[1112,1113],"live-demo",{"name":1114},"clamp-sweep",[20,1116,1117,1118,1122],{},"If both crossovers fall below the smallest screen you support, the value is effectively fixed at the maximum; if both fall above the largest, it is fixed at the minimum. The broken case 3 above crosses the minimum at 0 pixels and the maximum at 3200 pixels, so real screens only ever see the bottom tenth of its range. Designing values from chosen crossover widths, rather than guessing coefficients, avoids the problem entirely; the method is laid out in ",[29,1119,1121],{"href":1120},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-typography-without-javascript\u002F","Fluid Typography Without JavaScript",".",[40,1124,1126],{"id":1125},"zoom-changes-the-crossovers","Zoom changes the crossovers",[20,1128,1129,1130,1132,1133,1135,1136,1139,1140,1144],{},"One more subtlety: when the user zooms the page, CSS pixels grow, so the viewport shrinks in CSS pixels while ",[15,1131,78],{}," values stay the same number of CSS pixels. A preferred value with a large ",[15,1134,67],{}," component therefore ",[58,1137,1138],{},"decreases"," relative to the text as zoom increases, and the value may drop back to its minimum at high zoom. That is the mechanism behind the WCAG 1.4.4 failures described in ",[29,1141,1143],{"href":1142},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-type-accessibility-and-zoom\u002F","Fluid Type, Accessibility and Zoom",". When debugging a value that \"stops growing\" for some users, check it at 200% zoom as well as at different window sizes.",[40,1146,1148],{"id":1147},"devtools-workflow","DevTools workflow",[1150,1151,1152,1168,1174,1183,1189],"ol",{},[1153,1154,1155,1159,1160,347,1162,1164,1165,1167],"li",{},[1156,1157,1158],"strong",{},"Read the computed value."," Select the element; the Computed pane shows the final pixel value of ",[15,1161,396],{},[15,1163,492],{}," or whatever property uses ",[15,1166,17],{},". If it shows a value unrelated to the declaration, the declaration was invalid.",[1153,1169,1170,1173],{},[1156,1171,1172],{},"Check for a strikethrough or warning."," Chromium marks declarations that failed to parse with a warning icon and strikes them through; Firefox shows invalid values with a warning triangle. A computed-time failure is not struck through, so compare the computed value with what you expected.",[1153,1175,1176,1179,1180,1182],{},[1156,1177,1178],{},"Inspect custom properties."," Hover a ",[15,1181,1020],{}," in the Styles pane to see the substituted value. If it is not a length where one is required, that is case 4.",[1153,1184,1185,1188],{},[1156,1186,1187],{},"Sweep the width."," Use responsive design mode and drag the viewport from narrow to wide while watching the Computed value. It should be flat, then rising, then flat. If it never moves, recompute the crossovers.",[1153,1190,1191,1194],{},[1156,1192,1193],{},"Test zoom."," Repeat the sweep at 200% zoom to confirm the value still responds.",[40,1196,1198],{"id":1197},"browser-support","Browser support",[20,1200,1201,347,1203,1039,1206,1209,1210,1213],{},[15,1202,17],{},[15,1204,1205],{},"min()",[15,1207,1208],{},"max()"," are supported in Chrome and Edge 79+, Firefox 75+ and Safari 13.1+. The trigonometric functions used for the ",[15,1211,1212],{},"tan(atan2())"," ratio idiom are supported in current versions of all three engines. Container query units, often used as the preferred value's variable term, are supported in Chrome and Edge 105+, Firefox 110+ and Safari 16+. The behaviour described for invalid-at-computed-value-time declarations is defined by the Custom Properties specification and consistent across current engines.",[40,1215,1217],{"id":1216},"faq","FAQ",[20,1219,1220,1226,1227,52,1229,1231],{},[1156,1221,1222,1223,1225],{},"What happens if the minimum in ",[15,1224,17],{}," is larger than the maximum?","\nThe minimum wins. ",[15,1228,51],{},[15,1230,55],{},", so when MIN exceeds MAX the result is always MIN. The declaration is valid and silently produces a constant value instead of a fluid one.",[20,1233,1234,1240,1241,1244],{},[1156,1235,1236,1237,1239],{},"Why is my ",[15,1238,17],{}," declaration ignored entirely?","\nUsually a type mismatch: mixing a length with a plain number, such as ",[15,1242,1243],{},"clamp(1rem, 2vw, 3)",", or dividing a length by a length. Such expressions are invalid at parse time and the whole declaration is dropped, leaving the inherited or previous value.",[20,1246,1247,1250],{},[1156,1248,1249],{},"Why does my fluid font size never change?","\nEither the preferred value never leaves the range between the bounds at any real viewport width, or the bounds are so close together that the change is invisible. Calculate the viewport widths at which the preferred value equals each bound; if both fall outside real screen sizes, the value is effectively constant.",[20,1252,1253,1259,1260,1262],{},[1156,1254,1255,1256,1258],{},"How do I see what a ",[15,1257,17],{}," value resolves to?","\nSelect the element and read the Computed pane in DevTools, which shows the final pixel value. Resize the window or container while watching it. Chromium also lets you hover a ",[15,1261,1020],{}," reference in the Styles pane to see the custom property's value.",[40,1264,1266],{"id":1265},"related","Related",[1268,1269,1270,1275,1282,1289],"ul",{},[1153,1271,1272,1274],{},[29,1273,32],{"href":31}," — the parent guide.",[1153,1276,1277,1281],{},[29,1278,1280],{"href":1279},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fclamp-vs-media-query-typography\u002F","clamp() vs Media Query Typography"," — when a stepped scale is simpler.",[1153,1283,1284,1288],{},[29,1285,1287],{"href":1286},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fregistered-properties-and-type-safety\u002F","Registered Properties and Type Safety"," — preventing invalid tokens with @property.",[1153,1290,1291,1295],{},[29,1292,1294],{"href":1293},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-space-scale-with-clamp\u002F","Fluid Space Scale With clamp()"," — the same function applied to spacing.",[312,1297,1298],{},"html pre.shiki code .suds8, html code.shiki .suds8{--shiki-default:#0E1116;--shiki-dark:#F0F3F6}html pre.shiki code .sne4z, html code.shiki .sne4z{--shiki-default:#024C1A;--shiki-dark:#72F088}html pre.shiki code .s-5SL, html code.shiki .s-5SL{--shiki-default:#023B95;--shiki-dark:#91CBFF}html pre.shiki code .sT6z2, html code.shiki .sT6z2{--shiki-default:#032563;--shiki-dark:#ADDCFF}html pre.shiki code .sHUrx, html code.shiki .sHUrx{--shiki-default:#A0111F;--shiki-dark:#FF9492}html pre.shiki code .sLBg1, html code.shiki .sLBg1{--shiki-default:#66707B;--shiki-dark:#BDC4CC}html pre.shiki code .soyes, html code.shiki .soyes{--shiki-default:#702C00;--shiki-dark:#FFB757}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":196,"searchDepth":220,"depth":220,"links":1300},[1301,1303,1304,1305,1306,1307,1308,1309],{"id":42,"depth":220,"text":1302},"How clamp() actually resolves",{"id":185,"depth":220,"text":186},{"id":1027,"depth":220,"text":1028},{"id":1125,"depth":220,"text":1126},{"id":1147,"depth":220,"text":1148},{"id":1197,"depth":220,"text":1198},{"id":1216,"depth":220,"text":1217},{"id":1265,"depth":220,"text":1266},"Why a clamp() value is ignored, stuck at its minimum or never reaches its maximum: min above max, mixed types, invalid custom properties and the effect of zoom.","md",{"pageTitle":1313,"datePublished":1314,"dateModified":1314,"faq":1315},"Debugging clamp(): Invalid and Stuck Values","2026-09-18",[1316,1319,1322,1324],{"q":1317,"a":1318},"What happens if the minimum in clamp() is larger than the maximum?","The minimum wins. clamp(MIN, VAL, MAX) is defined as max(MIN, min(VAL, MAX)), so when MIN exceeds MAX the result is always MIN. The declaration is valid and silently produces a constant value instead of a fluid one.",{"q":1320,"a":1321},"Why is my clamp() declaration ignored entirely?","Usually a type mismatch: mixing a length with a plain number, such as clamp(1rem, 2vw, 3), or dividing a length by a length. Such expressions are invalid at parse time and the whole declaration is dropped, leaving the inherited or previous value.",{"q":1249,"a":1323},"Either the preferred value never leaves the range between the bounds at any real viewport width, or the bounds are so close together that the change is invisible. Calculate the viewport widths at which the preferred value equals each bound; if both fall outside real screen sizes, the value is effectively constant.",{"q":1325,"a":1326},"How do I see what a clamp() value resolves to?","Select the element and read the Computed pane in DevTools, which shows the final pixel value. Resize the window or container while watching it. Chromium also lets you hover a var() reference in the Styles pane to see the custom property's value.","\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fdebugging-clamp-values",{"title":5,"description":1310},"mastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fdebugging-clamp-values\u002Findex","bsnFxAp-JnaM4OkpDRIfSBR8wbHoyYeKfVk3e56bvbQ",[1332,1335,1338,1341,1344,1347,1350,1353,1356,1359,1362,1365,1368,1371,1374,1377,1380,1383,1386,1389,1392,1395,1398,1401,1404,1407,1410,1413,1416,1419,1422,1425,1428,1431,1434,1437,1440,1443,1446,1449,1452,1455,1458,1461,1464,1467,1470,1473,1476,1479,1482,1485,1488,1491,1494,1497,1500,1503,1506,1509,1512,1515,1518,1521,1524,1527,1530,1533,1536,1539,1542,1545,1548,1551,1554,1557,1560,1563,1566,1569,1572,1575,1578,1581,1584,1587,1590,1593,1596,1599,1602,1605,1608,1611,1613,1616,1619,1622,1625,1628,1631,1634,1637,1640,1643,1646,1649,1652,1655,1658,1661,1664,1667,1670,1673,1676,1679,1682,1685,1688,1691,1694,1697,1700,1703,1706,1709,1712,1715,1718,1721,1724,1727,1730,1731,1734,1737,1740,1743,1746,1749,1751,1754,1757,1760,1763,1766,1769,1772,1775,1778,1781,1784,1787,1790,1793,1796,1799,1802,1805,1808,1811,1814,1817,1820,1823,1826,1829,1832,1835,1838,1841,1844,1847,1850,1853,1856,1859,1862,1865,1868,1871,1874,1877,1880,1883,1886],{"path":1333,"title":1334},"\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":1336,"title":1337},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fflashing-content-and-seizure-thresholds","Flashing Content and Seizure Thresholds",{"path":1339,"title":1340},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fforced-colors-mode-and-animations","Forced Colors Mode and Animations",{"path":1342,"title":1343},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations","Accessibility in CSS Animations: Patterns, Specs & Best Practices",{"path":1345,"title":1346},"\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":1348,"title":1349},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fprefers-reduced-motion-recipes","prefers-reduced-motion Recipes: A Reduction for Every Common Effect",{"path":1351,"title":1352},"\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":1354,"title":1355},"\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":1357,"title":1358},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fvestibular-safe-animation-patterns","Vestibular-Safe Animation Patterns: Why Some Motion Makes People Sick",{"path":1360,"title":1361},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fwcag-motion-success-criteria","WCAG Motion Success Criteria: What Each One Actually Requires",{"path":1363,"title":1364},"\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":1366,"title":1367},"\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":1369,"title":1370},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations","Clip-Path & Mask Animations: Animating Visibility Instead of Position",{"path":1372,"title":1373},"\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":1375,"title":1376},"\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":1378,"title":1379},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fanimating-gradients","Animating CSS Gradients: Smooth Colour Motion Without Jumps",{"path":1381,"title":1382},"\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":1384,"title":1385},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions","Color & Theme Transitions: Colour as Part of the Motion System",{"path":1387,"title":1388},"\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":1390,"title":1391},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fsmooth-theme-switching-transitions","Smooth Theme Switching: Crossfades, Circular Reveals and No Flash",{"path":1393,"title":1394},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fcontainer-query-hover-affordances","Container Query Hover Affordances: When Narrow Means Persistent, Not Hidden",{"path":1396,"title":1397},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion","Container-Aware Motion: Animation Sized by the Space a Component Actually Has",{"path":1399,"title":1400},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Flayout-change-animations-at-container-breakpoints","Animating Changes at Container Breakpoints",{"path":1402,"title":1403},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fmotion-driven-by-container-style-queries","Motion Driven by Container Style Queries",{"path":1405,"title":1406},"\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":1408,"title":1409},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fsuppressing-motion-in-small-containers","Suppressing Motion in Small Containers: Deliberately Animating Nothing",{"path":1411,"title":1412},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fcontrolling-css-animations-from-javascript","Controlling CSS Animations From JavaScript",{"path":1414,"title":1415},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api","CSS Animation vs the Web Animations API: A Decision Guide",{"path":1417,"title":1418},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fwaapi-vs-css-for-interruptible-ui","Interruptible UI: CSS Transitions vs WAAPI",{"path":1420,"title":1421},"\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":1423,"title":1424},"\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":1426,"title":1427},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fcustom-property-fallbacks-and-invalid-values","Custom Property Fallbacks and Invalid Values",{"path":1429,"title":1430},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Ffluid-spacing-tokens-driving-transition-durations","Fluid Spacing Tokens That Drive Transition Durations",{"path":1432,"title":1433},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture","CSS Custom Properties Architecture: Scalable Design Systems & Dynamic UI",{"path":1435,"title":1436},"\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":1438,"title":1439},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fscoping-custom-properties-to-components","Scoping Custom Properties to Components",{"path":1441,"title":1442},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fcss-transition-timing-functions","CSS Transition Timing Functions: ease, cubic-bezier(), steps() and linear()",{"path":1444,"title":1445},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals","CSS Transition Fundamentals: Architecture, Performance & Patterns",{"path":1447,"title":1448},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Finterrupted-and-reversing-transitions","Interrupted and Reversing Transitions: What Happens Mid-Flight",{"path":1450,"title":1451},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fstarting-style-entry-animations","@starting-style: Animating an Element's Very First Style Change",{"path":1453,"title":1454},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-delay-choreography","Choreographing Motion With transition-delay",{"path":1456,"title":1457},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-shorthand-and-multiple-properties","The transition Shorthand and Multiple Properties",{"path":1459,"title":1460},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransitioning-display-with-allow-discrete","Transitioning display with transition-behavior: allow-discrete and @starting-style",{"path":1462,"title":1463},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fanimating-dialog-open-and-close","Animating \u003Cdialog> Open and Close: Both Directions, No Library",{"path":1465,"title":1466},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fbackdrop-animations","Animating ::backdrop: Fades and Blurs Behind Dialogs and Popovers",{"path":1468,"title":1469},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations","Dialog & Popover Animations: Motion for the Top Layer",{"path":1471,"title":1472},"\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":1474,"title":1475},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fpopover-entry-and-exit-transitions","Popover Menus That Animate From Their Anchor",{"path":1477,"title":1478},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fchoosing-animation-durations","Choosing Animation Durations: How Long Motion Should Last",{"path":1480,"title":1481},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fcubic-bezier-overshoot-and-anticipation","Overshoot and Anticipation With cubic-bezier(): Motion With Character",{"path":1483,"title":1484},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fentry-vs-exit-easing","Entry vs Exit Easing: Different Curves for Arriving and Leaving",{"path":1486,"title":1487},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design","Easing & Motion Design: Making CSS Motion Feel Intentional",{"path":1489,"title":1490},"\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":1492,"title":1493},"\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":1495,"title":1496},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Faccessible-css-only-tooltips","Accessible CSS-Only Tooltips and Hover Cards With  and ",{"path":1498,"title":1499},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fbutton-press-and-active-states","Button Press and  States",{"path":1501,"title":1502},"\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":1504,"title":1505},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Ffocus-within-form-patterns"," Form Patterns: Styling a Group From the Field Inside It",{"path":1507,"title":1508},"\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":1510,"title":1511},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design","Hover & Focus State Design: Spec-Compliant Patterns for Modern UIs",{"path":1513,"title":1514},"\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":1516,"title":1517},"\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":1519,"title":1520},"\u002Fcss-only-micro-interactions-animations","CSS-Only Micro-Interactions & Animations: Architecture, Performance & Implementation",{"path":1522,"title":1523},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fanimation-composition-and-stacking","Stacking Animations With animation-composition",{"path":1525,"title":1526},"\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":1528,"title":1529},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcontainer-query-triggered-keyframe-animations","Container-Query-Triggered Keyframe Animations: Animate Differently per Available Space",{"path":1531,"title":1532},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-accordions-and-disclosure","CSS-Only Accordions and Disclosure Widgets with details and summary",{"path":1534,"title":1535},"\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":1537,"title":1538},"\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":1540,"title":1541},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns","Keyframe Animation Patterns: Spec-Compliant Architectures for Modern UIs",{"path":1543,"title":1544},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fmulti-step-keyframes-and-per-keyframe-easing","Multi-Step Keyframes and Per-Keyframe Easing",{"path":1546,"title":1547},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fstaggered-list-animations-with-custom-properties","Staggered List Animations Using --i Index Custom Properties",{"path":1549,"title":1550},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fanimating-box-shadow-and-filters-cheaply","Animating box-shadow and Filters Cheaply",{"path":1552,"title":1553},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcontain-property-for-animation-performance","The contain Property for Animation Performance",{"path":1555,"title":1556},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcss-triggers-layout-paint-composite","Layout, Paint and Composite: What Triggers What",{"path":1558,"title":1559},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration","Performance & GPU Acceleration in CSS: A Developer’s Blueprint",{"path":1561,"title":1562},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Foptimizing-css-animations-for-60fps","Optimizing CSS Animations for 60fps: Budgeting the Frame",{"path":1564,"title":1565},"\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":1567,"title":1568},"\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":1570,"title":1571},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations","Scroll-Driven Animations: Binding Motion to Scroll Position in Pure CSS",{"path":1573,"title":1574},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-animation-fallbacks","Shipping Scroll-Driven Animations Without Breaking Anything",{"path":1576,"title":1577},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-parallax-effects","Scroll-Driven Parallax Effects in CSS",{"path":1579,"title":1580},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-progress-bar-without-javascript","A Reading Progress Bar Driven by scroll(root)",{"path":1582,"title":1583},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-triggered-reveal-animations","Reveal-on-Scroll with view() and animation-range",{"path":1585,"title":1586},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Ftimeline-scope-for-cross-element-animations","timeline-scope for Cross-Element Animations",{"path":1588,"title":1589},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fview-timeline-and-animation-range","View Timelines and animation-range",{"path":1591,"title":1592},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fcross-document-view-transitions","Cross-Document View Transitions",{"path":1594,"title":1595},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers","View Transitions for CSS Developers: the Pseudo-Element Tree, Snapshots, and Named Elements",{"path":1597,"title":1598},"\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":1600,"title":1601},"\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":1603,"title":1604},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transition-types-and-classes","View Transition Types and Classes",{"path":1606,"title":1607},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-for-list-reordering","View Transitions for List Reordering",{"path":1609,"title":1610},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-with-reduced-motion","Honouring prefers-reduced-motion in View Transitions",{"path":339,"title":1612},"Modern CSS Layouts & Micro-Interactions",{"path":1614,"title":1615},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioned-tooltips","Anchor-Positioned Tooltips: Tethering, Flipping, and Getting the Semantics Right",{"path":1617,"title":1618},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioning-fallbacks","Anchor Positioning Fallbacks: A Graceful Floor for Older Browser Versions",{"path":1620,"title":1621},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-size-for-matching-widths","anchor-size(): Overlays That Match Their Trigger's Size",{"path":1623,"title":1624},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays","CSS Anchor Positioning and Overlays: Tethering Elements Without JavaScript",{"path":1626,"title":1627},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-attribute-and-css-styling","The popover Attribute: Top-Layer Overlays With No JavaScript",{"path":1629,"title":1630},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-light-dismiss-and-stacking","Popover Light Dismiss, Nesting and Stacking",{"path":1632,"title":1633},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fposition-area-grid-explained","position-area: The Anchor Placement Grid",{"path":1635,"title":1636},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fcontainer-query-polyfill-tradeoffs","Container Query Polyfills: What They Cost and When to Skip Them",{"path":1638,"title":1639},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ffeature-detection-with-supports","Feature Detection with @supports: Syntax, Semantics, and the Traps",{"path":1641,"title":1642},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fhandling-container-query-fallbacks-for-older-browsers","Handling Container Query Fallbacks for Older Browsers",{"path":1644,"title":1645},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks","Container Query Fallbacks: Spec-Compliant CSS Strategies for Legacy Browsers",{"path":1647,"title":1648},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fintrinsic-layout-fallbacks-without-queries","Intrinsic Layout Fallbacks: Baselines That Adapt Without Any Query",{"path":1650,"title":1651},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ftesting-fallbacks-without-old-browsers","Testing CSS Fallbacks Without an Old Browser",{"path":1653,"title":1654},"\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":1656,"title":1657},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-query-range-and-logic-operators","Container Query Range Syntax and Logic Operators",{"path":1659,"title":1660},"\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":1662,"title":1663},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-type-size-vs-inline-size","Choosing container-type: inline-size, size, or normal",{"path":1665,"title":1666},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-vs-media-queries-comparison","Container vs Media Queries: Choosing the Right Reference Box",{"path":1668,"title":1669},"\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":1671,"title":1672},"\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":1674,"title":1675},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics","Container Query Syntax Basics",{"path":1677,"title":1678},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fnesting-and-naming-container-queries","Nesting and Naming Container Queries: Targeting the Right Ancestor",{"path":1680,"title":1681},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fauto-fit-minmax-responsive-grids","Responsive Grids with repeat(auto-fit, minmax())",{"path":1683,"title":1684},"\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":1686,"title":1687},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fgrid-auto-flow-dense-packing","grid-auto-flow: dense for Packed Layouts",{"path":1689,"title":1690},"\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":1692,"title":1693},"\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":1695,"title":1696},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts","CSS Grid and Subgrid Layouts for Responsive Interfaces",{"path":1698,"title":1699},"\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":1701,"title":1702},"\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":1704,"title":1705},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fsubgrid-vs-nested-grid","Subgrid vs an Independently Nested Grid",{"path":1707,"title":1708},"\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":1710,"title":1711},"\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":1713,"title":1714},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-grow-and-flex-shrink-explained","flex-grow and flex-shrink Explained",{"path":1716,"title":1717},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-wrap-intrinsic-responsive-rows","Breakpoint-Free Responsive Rows With flex-wrap and flex-basis",{"path":1719,"title":1720},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflexbox-gap-and-spacing","Flexbox gap vs Margins: Spacing Items Without Edge Hacks",{"path":1722,"title":1723},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns","Flexbox Layout Patterns: One-Dimensional Layout for Real Components",{"path":1725,"title":1726},"\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":1728,"title":1729},"\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":1327,"title":5},{"path":1732,"title":1733},"\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":1735,"title":1736},"\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":1738,"title":1739},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-type-accessibility-and-zoom","Fluid Type, Accessibility and Zoom: The vw-Only Trap",{"path":1741,"title":1742},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-typography-without-javascript","Fluid Typography Without JavaScript: A Precision CSS Reference",{"path":1744,"title":1745},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp","Fluid Typography with clamp(): A Practical Guide for Modern CSS",{"path":1747,"title":1748},"\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":1750,"title":37},"\u002Fmastering-container-queries-responsive-layouts",{"path":1752,"title":1753},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Faspect-ratio-for-responsive-media","Using aspect-ratio for Responsive Media and Preventing Layout Shift",{"path":1755,"title":1756},"\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":1758,"title":1759},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques","Intrinsic Sizing Techniques: Modern CSS Layouts for Responsive UI",{"path":1761,"title":1762},"\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":1764,"title":1765},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fmin-max-fit-content-explained","min-content, max-content, and fit-content() Explained",{"path":1767,"title":1768},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fobject-fit-and-object-position","object-fit and object-position: Images That Fit Any Box",{"path":1770,"title":1771},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fpreventing-flex-and-grid-overflow","The min-width: auto Trap in Flex and Grid Layouts",{"path":1773,"title":1774},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-for-reset-and-tokens","Cascade Layers for Reset and Design Tokens",{"path":1776,"title":1777},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-vs-specificity-hacks","Cascade Layers vs Specificity Hacks: Ordering Instead of Escalating",{"path":1779,"title":1780},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcss-scope-for-component-styles","@scope for Component Styles: Short Selectors That Cannot Leak",{"path":1782,"title":1783},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies","Modern CSS Reset Strategies: A Spec-Compliant Foundation",{"path":1785,"title":1786},"\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":1788,"title":1789},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fwriting-a-minimal-modern-reset","Writing a Minimal Modern CSS Reset: Every Line Justified",{"path":1791,"title":1792},"\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":1794,"title":1795},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fempty-and-loading-states-with-has","Empty and Loading States With ()",{"path":1797,"title":1798},"\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":1800,"title":1801},"\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":1803,"title":1804},"\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":1806,"title":1807},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has","Parent-Aware Layouts With :has(): Letting Containers React to Their Contents",{"path":1809,"title":1810},"\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":1812,"title":1813},"\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":1815,"title":1816},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-data-tables","Container Query Data Tables: Reflowing Tables to Cards",{"path":1818,"title":1819},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-sidebar-layouts","Container Query Sidebar Layouts That Travel Between Contexts",{"path":1821,"title":1822},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns","Responsive Component Patterns: Architecture & Implementation",{"path":1824,"title":1825},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-forms-with-container-queries","Responsive Forms with Container Queries: Reflow Without Losing the Wiring",{"path":1827,"title":1828},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-hero-sections-with-container-queries","Responsive Hero Sections With Container Queries",{"path":1830,"title":1831},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-navigation-without-media-queries","Responsive Navigation Without Media Queries Using Container Queries",{"path":1833,"title":1834},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-pricing-tables","Responsive Pricing Tables: Aligned Features, a Clear Recommendation, Any Width",{"path":1836,"title":1837},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Ftabs-that-become-accordions","Tabs That Become an Accordion: One Component, Two Layouts",{"path":1839,"title":1840},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fcss-only-carousel-with-scroll-snap","A CSS-Only Carousel With Scroll Snap",{"path":1842,"title":1843},"\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":1845,"title":1846},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts","Scroll Snap & Overflow Layouts: Designing Components That Scroll on Purpose",{"path":1848,"title":1849},"\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":1851,"title":1852},"\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":1854,"title":1855},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fcombining-size-and-style-queries","Combining Size and Style Container Queries",{"path":1857,"title":1858},"\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":1860,"title":1861},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state","Style Queries and Container State: Token-Driven Component Variants",{"path":1863,"title":1864},"\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":1866,"title":1867},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fstyle-query-component-variants","Component Variants With Style Queries: One Token, Many Looks",{"path":1869,"title":1870},"\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":1872,"title":1873},"\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":1875,"title":1876},"\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":1878,"title":1879},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout","Viewport Units & Mobile Layout: Designing for the Screen You Actually Get",{"path":1881,"title":1882},"\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":1884,"title":1885},"\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":1887,"title":1888},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Fvirtual-keyboard-and-interactive-widget","Layouts That Survive the Virtual Keyboard",{"title":1890,"caption":1891,"height":1892,"resizable":371,"html":1893,"css":1894},"Watching clamp() stay flat, rise, then stay flat","Drag the frame from narrow to wide: each bar is pinned at its minimum, then grows with the frame, then stops at its maximum. The broken bar barely moves.",230,"\n\u003Cdiv class=\"bars\">\n  \u003Cdiv class=\"bar good\">clamp(6rem, 40vw, 18rem)\u003C\u002Fdiv>\n  \u003Cdiv class=\"bar broken\">clamp(6rem, 6rem + 1vw, 18rem)\u003C\u002Fdiv>\n\u003C\u002Fdiv>","\nbody { display: block; }\n.bars { display: grid; gap: 1rem; }\n.bar { height: 3rem; display: flex; align-items: center; padding-inline: 0.6rem; border-radius: 8px; font: 12px ui-monospace, monospace; white-space: nowrap; overflow: hidden; }\n.good { width: clamp(6rem, 40vw, 18rem); background: var(--demo-accent); color: #ffffff; }\n.broken { width: clamp(6rem, 6rem + 1vw, 18rem); background: var(--demo-surface); border: 1px dashed var(--demo-border); }",1789717748433]