[{"data":1,"prerenderedAt":1974},["ShallowReactive",2],{"page-\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fscoping-custom-properties-to-components\u002F":3,"content-all-pages":1410,"live-demo:scoped-custom-props":1968},{"id":4,"title":5,"body":6,"description":1393,"extension":1394,"meta":1395,"navigation":317,"path":1406,"seo":1407,"stem":1408,"__hash__":1409},"content\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fscoping-custom-properties-to-components\u002Findex.md","Scoping Custom Properties to Components",{"type":7,"value":8,"toc":1380},"minimark",[9,13,45,50,53,123,127,130,134,787,799,803,818,878,888,892,902,986,997,1001,1007,1171,1181,1185,1188,1227,1230,1234,1260,1273,1277,1280,1284,1301,1305,1311,1327,1339,1345,1349,1377],[10,11,5],"h1",{"id":12},"scoping-custom-properties-to-components",[14,15,16,17,21,22,25,26,29,30,33,34,39,40,44],"p",{},"Inheritance is what makes custom properties powerful: set ",[18,19,20],"code",{},"--accent"," on ",[18,23,24],{},":root"," and every component can read it. It is also what makes them leak. Set ",[18,27,28],{},"--card-bg"," on one card to give it a special colour, nest another card inside it, and the inner card turns the same colour — it inherited the value, because it reads the same name. For motion the same leak produces stranger bugs: a slow ",[18,31,32],{},"--duration"," meant for a drawer slows every button inside the drawer. This page covers the patterns that keep component properties where they belong: a public\u002Fprivate naming convention, resetting at the component root, and registered properties that do not inherit at all. It belongs to ",[35,36,38],"a",{"href":37},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002F","CSS Custom Properties Architecture"," in the ",[35,41,43],{"href":42},"\u002Fcss-only-micro-interactions-animations\u002F","CSS-Only Micro-Interactions & Animations"," guide.",[46,47,49],"h2",{"id":48},"how-the-leak-happens","How the leak happens",[14,51,52],{},"A custom property set on an element is inherited by all of its descendants unless one of them sets the property itself. Components usually read their customisation properties directly, so a nested instance of the same component — or a different component that happens to use the same name — picks up the ancestor's value.",[54,55,61,62,61,66,61,70,61,78,61,84,61,91,61,100,61,106,61,111,61,116,61,119],"svg",{"viewBox":56,"role":57,"ariaLabel":58,"xmlns":59,"style":60},"0 0 720 290","img","An outer card with --card-bg set to amber contains an inner card that sets nothing; the inner card inherits amber as well","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","width:100%;height:auto;max-width:720px;margin:2rem 0","\n  ",[63,64,65],"title",{},"Inheritance carries the value inwards",[67,68,69],"desc",{},"A large outer card labelled --card-bg amber. Inside it, a smaller inner card with no custom property set of its own. An arrow shows the amber value flowing from the outer card to the inner card, so both are amber even though only the outer one was customised.",[71,72,77],"text",{"textAnchor":73,"x":74,"y":75,"style":76},"middle","360","26","text-anchor:middle;fill:currentColor;font:700 17px sans-serif","The inner card never asked for amber",[79,80],"path",{"d":81,"fill":82,"opacity":83},"M120 50 H600 V260 H120 Z","#7aa2ff","0.25",[71,85,90],{"textAnchor":86,"x":87,"y":88,"style":89},"start","140","78","text-anchor:start;fill:currentColor;font:600 13px ui-monospace,monospace",".card  --card-bg: amber",[79,92],{"d":93,"fill":82,"opacity":94,"stroke":95,"strokeWidth":96,"strokeDashArray":97},"M250 120 H570 V230 H250 Z","0.3","currentColor","1.5",[98,99],"6","4",[71,101,105],{"textAnchor":73,"x":102,"y":103,"style":104},"410","165","text-anchor:middle;fill:currentColor;font:600 13px ui-monospace,monospace",".card (nested)",[71,107,110],{"textAnchor":73,"x":102,"y":108,"style":109},"190","text-anchor:middle;fill:currentColor;font:12px sans-serif","sets nothing, inherits amber",[79,112],{"d":113,"fill":114,"stroke":95,"strokeWidth":115},"M190 96 C190 150 210 175 250 175","none","2",[79,117],{"d":118,"fill":95},"M242 169 L252 175 L242 181 Z",[71,120,122],{"textAnchor":73,"x":74,"y":121,"style":109},"284","Any descendant reading --card-bg sees the nearest ancestor's value.",[46,124,126],{"id":125},"the-complete-implementation","The complete implementation",[14,128,129],{},"The demo shows two nested pairs of cards. In the first pair the component reads its public property directly and the colour leaks. In the second, the component uses the public\u002Fprivate pattern and the nested card keeps its default.",[131,132],"live-demo",{"name":133},"scoped-custom-props",[135,136,141],"pre",{"className":137,"code":138,"language":139,"meta":140,"style":140},"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>Scoped custom properties\u003C\u002Ftitle>\n\u003Cstyle>\n  body { font: 15px\u002F1.5 system-ui, sans-serif; margin: 2rem; }\n\n  \u002F* Leaky: the component reads its public property directly. *\u002F\n  .card-leaky {\n    padding: 1rem;\n    border-radius: 10px;\n    background: var(--card-bg, #f1f5f9);\n  }\n\n  \u002F* Scoped: public API in, private value out. *\u002F\n  .card {\n    \u002F* Copy the public input into a private value, with a default. *\u002F\n    --_card-bg: var(--card-bg, #f1f5f9);\n    --_card-duration: var(--card-duration, var(--motion-base, 200ms));\n    padding: 1rem;\n    border-radius: 10px;\n    background: var(--_card-bg);\n    transition: background-color var(--_card-duration) ease-out;\n  }\n\n  \u002F* Consumers customise through a modifier that sets the local input. *\u002F\n  .card--highlight { --card-bg: #fde68a; }\n\n  \u002F* Nested cards start clean. :where() gives zero specificity,\n     so a modifier on the nested card still wins. *\u002F\n  :where(.card .card) { --card-bg: initial; }\n\u003C\u002Fstyle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cdiv class=\"card-leaky\" style=\"--card-bg: #fde68a\">\n    Outer (leaky)\n    \u003Cdiv class=\"card-leaky\">Inner inherits amber\u003C\u002Fdiv>\n  \u003C\u002Fdiv>\n\n  \u003Cdiv class=\"card card--highlight\">\n    Outer (scoped)\n    \u003Cdiv class=\"card\">Inner keeps its default\u003C\u002Fdiv>\n  \u003C\u002Fdiv>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n","html","",[18,142,143,163,183,193,211,236,250,260,312,319,326,335,351,366,391,397,402,408,416,422,442,477,490,503,519,543,548,553,559,576,581,587,593,619,629,638,648,675,681,702,712,717,733,739,760,769,778],{"__ignoreMap":140},[144,145,148,152,156,160],"span",{"class":146,"line":147},"line",1,[144,149,151],{"class":150},"suds8","\u003C!",[144,153,155],{"class":154},"sne4z","doctype",[144,157,159],{"class":158},"s-5SL"," html",[144,161,162],{"class":150},">\n",[144,164,166,169,171,174,177,181],{"class":146,"line":165},2,[144,167,168],{"class":150},"\u003C",[144,170,139],{"class":154},[144,172,173],{"class":158}," lang",[144,175,176],{"class":150},"=",[144,178,180],{"class":179},"sT6z2","\"en\"",[144,182,162],{"class":150},[144,184,186,188,191],{"class":146,"line":185},3,[144,187,168],{"class":150},[144,189,190],{"class":154},"head",[144,192,162],{"class":150},[144,194,196,198,201,204,206,209],{"class":146,"line":195},4,[144,197,168],{"class":150},[144,199,200],{"class":154},"meta",[144,202,203],{"class":158}," charset",[144,205,176],{"class":150},[144,207,208],{"class":179},"\"utf-8\"",[144,210,162],{"class":150},[144,212,214,216,218,221,223,226,229,231,234],{"class":146,"line":213},5,[144,215,168],{"class":150},[144,217,200],{"class":154},[144,219,220],{"class":158}," name",[144,222,176],{"class":150},[144,224,225],{"class":179},"\"viewport\"",[144,227,228],{"class":158}," content",[144,230,176],{"class":150},[144,232,233],{"class":179},"\"width=device-width, initial-scale=1\"",[144,235,162],{"class":150},[144,237,239,241,243,246,248],{"class":146,"line":238},6,[144,240,168],{"class":150},[144,242,63],{"class":154},[144,244,245],{"class":150},">Scoped custom properties\u003C\u002F",[144,247,63],{"class":154},[144,249,162],{"class":150},[144,251,253,255,258],{"class":146,"line":252},7,[144,254,168],{"class":150},[144,256,257],{"class":154},"style",[144,259,162],{"class":150},[144,261,263,266,269,272,275,278,282,285,287,290,293,296,299,302,304,306,309],{"class":146,"line":262},8,[144,264,265],{"class":154},"  body",[144,267,268],{"class":150}," { ",[144,270,271],{"class":158},"font",[144,273,274],{"class":150},": ",[144,276,277],{"class":158},"15",[144,279,281],{"class":280},"sHUrx","px",[144,283,284],{"class":150},"\u002F",[144,286,96],{"class":158},[144,288,289],{"class":158}," system-ui",[144,291,292],{"class":150},", ",[144,294,295],{"class":158},"sans-serif",[144,297,298],{"class":150},"; ",[144,300,301],{"class":158},"margin",[144,303,274],{"class":150},[144,305,115],{"class":158},[144,307,308],{"class":280},"rem",[144,310,311],{"class":150},"; }\n",[144,313,315],{"class":146,"line":314},9,[144,316,318],{"emptyLinePlaceholder":317},true,"\n",[144,320,322],{"class":146,"line":321},10,[144,323,325],{"class":324},"sLBg1","  \u002F* Leaky: the component reads its public property directly. *\u002F\n",[144,327,329,332],{"class":146,"line":328},11,[144,330,331],{"class":158},"  .card-leaky",[144,333,334],{"class":150}," {\n",[144,336,338,341,343,346,348],{"class":146,"line":337},12,[144,339,340],{"class":158},"    padding",[144,342,274],{"class":150},[144,344,345],{"class":158},"1",[144,347,308],{"class":280},[144,349,350],{"class":150},";\n",[144,352,354,357,359,362,364],{"class":146,"line":353},13,[144,355,356],{"class":158},"    border-radius",[144,358,274],{"class":150},[144,360,361],{"class":158},"10",[144,363,281],{"class":280},[144,365,350],{"class":150},[144,367,369,372,374,377,380,383,385,388],{"class":146,"line":368},14,[144,370,371],{"class":158},"    background",[144,373,274],{"class":150},[144,375,376],{"class":158},"var",[144,378,379],{"class":150},"(",[144,381,28],{"class":382},"soyes",[144,384,292],{"class":150},[144,386,387],{"class":158},"#f1f5f9",[144,389,390],{"class":150},");\n",[144,392,394],{"class":146,"line":393},15,[144,395,396],{"class":150},"  }\n",[144,398,400],{"class":146,"line":399},16,[144,401,318],{"emptyLinePlaceholder":317},[144,403,405],{"class":146,"line":404},17,[144,406,407],{"class":324},"  \u002F* Scoped: public API in, private value out. *\u002F\n",[144,409,411,414],{"class":146,"line":410},18,[144,412,413],{"class":158},"  .card",[144,415,334],{"class":150},[144,417,419],{"class":146,"line":418},19,[144,420,421],{"class":324},"    \u002F* Copy the public input into a private value, with a default. *\u002F\n",[144,423,425,428,430,432,434,436,438,440],{"class":146,"line":424},20,[144,426,427],{"class":382},"    --_card-bg",[144,429,274],{"class":150},[144,431,376],{"class":158},[144,433,379],{"class":150},[144,435,28],{"class":382},[144,437,292],{"class":150},[144,439,387],{"class":158},[144,441,390],{"class":150},[144,443,445,448,450,452,454,457,459,461,463,466,468,471,474],{"class":146,"line":444},21,[144,446,447],{"class":382},"    --_card-duration",[144,449,274],{"class":150},[144,451,376],{"class":158},[144,453,379],{"class":150},[144,455,456],{"class":382},"--card-duration",[144,458,292],{"class":150},[144,460,376],{"class":158},[144,462,379],{"class":150},[144,464,465],{"class":382},"--motion-base",[144,467,292],{"class":150},[144,469,470],{"class":158},"200",[144,472,473],{"class":280},"ms",[144,475,476],{"class":150},"));\n",[144,478,480,482,484,486,488],{"class":146,"line":479},22,[144,481,340],{"class":158},[144,483,274],{"class":150},[144,485,345],{"class":158},[144,487,308],{"class":280},[144,489,350],{"class":150},[144,491,493,495,497,499,501],{"class":146,"line":492},23,[144,494,356],{"class":158},[144,496,274],{"class":150},[144,498,361],{"class":158},[144,500,281],{"class":280},[144,502,350],{"class":150},[144,504,506,508,510,512,514,517],{"class":146,"line":505},24,[144,507,371],{"class":158},[144,509,274],{"class":150},[144,511,376],{"class":158},[144,513,379],{"class":150},[144,515,516],{"class":382},"--_card-bg",[144,518,390],{"class":150},[144,520,522,525,528,530,532,535,538,541],{"class":146,"line":521},25,[144,523,524],{"class":158},"    transition",[144,526,527],{"class":150},": background-color ",[144,529,376],{"class":158},[144,531,379],{"class":150},[144,533,534],{"class":382},"--_card-duration",[144,536,537],{"class":150},") ",[144,539,540],{"class":158},"ease-out",[144,542,350],{"class":150},[144,544,546],{"class":146,"line":545},26,[144,547,396],{"class":150},[144,549,551],{"class":146,"line":550},27,[144,552,318],{"emptyLinePlaceholder":317},[144,554,556],{"class":146,"line":555},28,[144,557,558],{"class":324},"  \u002F* Consumers customise through a modifier that sets the local input. *\u002F\n",[144,560,562,565,567,569,571,574],{"class":146,"line":561},29,[144,563,564],{"class":158},"  .card--highlight",[144,566,268],{"class":150},[144,568,28],{"class":382},[144,570,274],{"class":150},[144,572,573],{"class":158},"#fde68a",[144,575,311],{"class":150},[144,577,579],{"class":146,"line":578},30,[144,580,318],{"emptyLinePlaceholder":317},[144,582,584],{"class":146,"line":583},31,[144,585,586],{"class":324},"  \u002F* Nested cards start clean. :where() gives zero specificity,\n",[144,588,590],{"class":146,"line":589},32,[144,591,592],{"class":324},"     so a modifier on the nested card still wins. *\u002F\n",[144,594,596,599,601,604,607,610,612,614,617],{"class":146,"line":595},33,[144,597,598],{"class":158},"  :where",[144,600,379],{"class":150},[144,602,603],{"class":158},".card",[144,605,606],{"class":158}," .card",[144,608,609],{"class":150},") { ",[144,611,28],{"class":382},[144,613,274],{"class":150},[144,615,616],{"class":158},"initial",[144,618,311],{"class":150},[144,620,622,625,627],{"class":146,"line":621},34,[144,623,624],{"class":150},"\u003C\u002F",[144,626,257],{"class":154},[144,628,162],{"class":150},[144,630,632,634,636],{"class":146,"line":631},35,[144,633,624],{"class":150},[144,635,190],{"class":154},[144,637,162],{"class":150},[144,639,641,643,646],{"class":146,"line":640},36,[144,642,168],{"class":150},[144,644,645],{"class":154},"body",[144,647,162],{"class":150},[144,649,651,654,657,660,662,665,668,670,673],{"class":146,"line":650},37,[144,652,653],{"class":150},"  \u003C",[144,655,656],{"class":154},"div",[144,658,659],{"class":158}," class",[144,661,176],{"class":150},[144,663,664],{"class":179},"\"card-leaky\"",[144,666,667],{"class":158}," style",[144,669,176],{"class":150},[144,671,672],{"class":179},"\"--card-bg: #fde68a\"",[144,674,162],{"class":150},[144,676,678],{"class":146,"line":677},38,[144,679,680],{"class":150},"    Outer (leaky)\n",[144,682,684,687,689,691,693,695,698,700],{"class":146,"line":683},39,[144,685,686],{"class":150},"    \u003C",[144,688,656],{"class":154},[144,690,659],{"class":158},[144,692,176],{"class":150},[144,694,664],{"class":179},[144,696,697],{"class":150},">Inner inherits amber\u003C\u002F",[144,699,656],{"class":154},[144,701,162],{"class":150},[144,703,705,708,710],{"class":146,"line":704},40,[144,706,707],{"class":150},"  \u003C\u002F",[144,709,656],{"class":154},[144,711,162],{"class":150},[144,713,715],{"class":146,"line":714},41,[144,716,318],{"emptyLinePlaceholder":317},[144,718,720,722,724,726,728,731],{"class":146,"line":719},42,[144,721,653],{"class":150},[144,723,656],{"class":154},[144,725,659],{"class":158},[144,727,176],{"class":150},[144,729,730],{"class":179},"\"card card--highlight\"",[144,732,162],{"class":150},[144,734,736],{"class":146,"line":735},43,[144,737,738],{"class":150},"    Outer (scoped)\n",[144,740,742,744,746,748,750,753,756,758],{"class":146,"line":741},44,[144,743,686],{"class":150},[144,745,656],{"class":154},[144,747,659],{"class":158},[144,749,176],{"class":150},[144,751,752],{"class":179},"\"card\"",[144,754,755],{"class":150},">Inner keeps its default\u003C\u002F",[144,757,656],{"class":154},[144,759,162],{"class":150},[144,761,763,765,767],{"class":146,"line":762},45,[144,764,707],{"class":150},[144,766,656],{"class":154},[144,768,162],{"class":150},[144,770,772,774,776],{"class":146,"line":771},46,[144,773,624],{"class":150},[144,775,645],{"class":154},[144,777,162],{"class":150},[144,779,781,783,785],{"class":146,"line":780},47,[144,782,624],{"class":150},[144,784,139],{"class":154},[144,786,162],{"class":150},[14,788,789,790,792,793,795,796,798],{},"The scoped version has three layers. Consumers set the public input property (",[18,791,28],{},") through a modifier class. The component copies it into a private property (",[18,794,516],{},"), with a default, at its own root. And nested cards explicitly reset the input to ",[18,797,616],{}," — the guaranteed-invalid value — so the fallback in the private property applies again. The leading underscore is a convention, not syntax: it signals \"internal, do not set from outside\".",[46,800,802],{"id":801},"the-key-technique-reset-inputs-at-the-component-boundary","The key technique: reset inputs at the component boundary",[14,804,805,806,809,810,813,814,817],{},"The reset line — ",[18,807,808],{},":where(.card .card) { --card-bg: initial; }"," — is the piece most implementations miss. Without it, the nested card's private property would compute from the inherited input and still turn amber. Resetting inputs at each nested component root turns inheritance from \"everything flows down\" into \"each component starts clean\". Wrapping the selector in ",[18,811,812],{},":where()"," matters: any declaration beats inheritance, so the reset needs no specificity at all, and keeping it at zero means a modifier such as ",[18,815,816],{},".card--highlight"," on the nested card still overrides it.",[54,819,61,822,61,825,61,828,61,831,61,839,61,843,61,846,61,851,61,854,61,858,61,861,61,864,61,869,61,873],{"viewBox":820,"role":57,"ariaLabel":821,"xmlns":59,"style":60},"0 0 720 280","Three layers: a public input property set by the consumer, a private property computed at each component root with a default, and styles that only read the private property; nested roots reset the input",[63,823,824],{},"Input, private value, styles",[67,826,827],{},"Three stacked boxes. Top: input property, set by the consumer on one component. Middle: private property, computed at the component root as var of the input with a default. Bottom: styles, which only ever read the private property. A side note shows nested component roots resetting the input to initial so the default applies again.",[71,829,830],{"textAnchor":73,"x":74,"y":75,"style":76},"Three layers per component",[832,833],"rect",{"x":834,"y":835,"width":836,"height":835,"rx":837,"fill":82,"opacity":838,"stroke":82,"strokeWidth":96},"160","50","400","8","0.2",[832,840],{"x":834,"y":841,"width":836,"height":835,"rx":837,"fill":82,"opacity":842,"stroke":82,"strokeWidth":96},"130","0.35",[832,844],{"x":834,"y":845,"width":836,"height":835,"rx":837,"fill":114,"stroke":95,"strokeWidth":96},"210",[71,847,850],{"textAnchor":73,"x":74,"y":848,"style":849},"80","text-anchor:middle;fill:currentColor;font:12px ui-monospace,monospace","input: --card-bg (set by consumer)",[71,852,853],{"textAnchor":73,"x":74,"y":834,"style":849},"private: --_card-bg: var(input, default)",[71,855,857],{"textAnchor":73,"x":74,"y":856,"style":849},"240","styles read only --_card-bg",[146,859],{"x1":74,"y1":860,"x2":74,"y2":841,"stroke":95,"strokeWidth":96},"100",[146,862],{"x1":74,"y1":863,"x2":74,"y2":845,"stroke":95,"strokeWidth":96},"180",[71,865,868],{"textAnchor":86,"x":866,"y":848,"style":867},"580","text-anchor:start;fill:currentColor;font:11px sans-serif","nested roots",[71,870,872],{"textAnchor":86,"x":866,"y":871,"style":867},"96","reset to initial",[71,874,877],{"textAnchor":875,"x":87,"y":834,"style":876},"end","text-anchor:end;fill:currentColor;font:11px sans-serif","per root",[14,879,880,881,21,883,887],{},"For large design systems the reset can be generalised: a component's root rule sets all of its inputs to ",[18,882,616],{},[884,885,886],"em",{},"nested"," instances, and a modifier or inline style on a specific instance sets them again. Where there are many inputs, a cascade layer that holds only the resets keeps them from interfering with modifiers.",[46,889,891],{"id":890},"registered-properties-that-do-not-inherit","Registered properties that do not inherit",[14,893,894,897,898,901],{},[18,895,896],{},"@property"," offers a stronger form of isolation. A property registered with ",[18,899,900],{},"inherits: false"," is simply not passed to descendants:",[135,903,907],{"className":904,"code":905,"language":906,"meta":140,"style":140},"language-css shiki shiki-themes github-light-high-contrast github-dark-high-contrast","@property --card-bg {\n  syntax: \"\u003Ccolor>\";\n  inherits: false;\n  initial-value: #f1f5f9;\n}\n\n.card { background: var(--card-bg); }\n.card--highlight { --card-bg: #fde68a; }\n","css",[18,908,909,916,927,932,943,948,952,972],{"__ignoreMap":140},[144,910,911,913],{"class":146,"line":147},[144,912,896],{"class":280},[144,914,915],{"class":150}," --card-bg {\n",[144,917,918,921,924],{"class":146,"line":165},[144,919,920],{"class":150},"  syntax: \"\u003Ccolor",[144,922,923],{"class":280},">",[144,925,926],{"class":150},"\";\n",[144,928,929],{"class":146,"line":185},[144,930,931],{"class":150},"  inherits: false;\n",[144,933,934,937,939],{"class":146,"line":195},[144,935,936],{"class":154},"  initial-value",[144,938,274],{"class":150},[144,940,942],{"class":941},"sh5d0","#f1f5f9;\n",[144,944,945],{"class":146,"line":213},[144,946,947],{"class":150},"}\n",[144,949,950],{"class":146,"line":238},[144,951,318],{"emptyLinePlaceholder":317},[144,953,954,956,958,961,963,965,967,969],{"class":146,"line":252},[144,955,603],{"class":158},[144,957,268],{"class":150},[144,959,960],{"class":158},"background",[144,962,274],{"class":150},[144,964,376],{"class":158},[144,966,379],{"class":150},[144,968,28],{"class":382},[144,970,971],{"class":150},"); }\n",[144,973,974,976,978,980,982,984],{"class":146,"line":262},[144,975,816],{"class":158},[144,977,268],{"class":150},[144,979,28],{"class":382},[144,981,274],{"class":150},[144,983,573],{"class":158},[144,985,311],{"class":150},[14,987,988,989,991,992,996],{},"The nested card now receives the initial value automatically; no reset rule is needed. The trade-off is that the value must be set on exactly the element that reads it. A consumer who sets ",[18,990,28],{}," on a wrapper around the card — a common and reasonable thing to do — gets no effect at all. Non-inheriting registration suits properties that genuinely belong to one element, like an animated angle for a gradient border, and suits animation more generally: ",[35,993,995],{"href":994},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fanimating-custom-properties-with-at-property\u002F","Animating Custom Properties With @property"," shows why registration is also what makes such values animatable.",[46,998,1000],{"id":999},"motion-tokens-inherit-globally-override-locally","Motion tokens: inherit globally, override locally",[14,1002,1003,1004,1006],{},"Motion tokens need the opposite of isolation at the global level. A base duration and easing defined on ",[18,1005,24],{}," should reach every component, so that a single reduced-motion override adjusts the whole site:",[135,1008,1010],{"className":904,"code":1009,"language":906,"meta":140,"style":140},":root {\n  --motion-base: 200ms;\n  --motion-ease: cubic-bezier(0.2, 0, 0, 1);\n}\n\n@media (prefers-reduced-motion: reduce) {\n  :root { --motion-base: 1ms; }\n}\n\n.drawer {\n  \u002F* Component-specific: slower, but still derived from the global token. *\u002F\n  --_drawer-duration: calc(var(--motion-base) * 1.75);\n  transition: translate var(--_drawer-duration) var(--motion-ease);\n}\n",[18,1011,1012,1018,1031,1060,1064,1068,1076,1093,1097,1101,1108,1113,1141,1167],{"__ignoreMap":140},[144,1013,1014,1016],{"class":146,"line":147},[144,1015,24],{"class":158},[144,1017,334],{"class":150},[144,1019,1020,1023,1025,1027,1029],{"class":146,"line":165},[144,1021,1022],{"class":382},"  --motion-base",[144,1024,274],{"class":150},[144,1026,470],{"class":158},[144,1028,473],{"class":280},[144,1030,350],{"class":150},[144,1032,1033,1036,1038,1041,1043,1045,1047,1050,1052,1054,1056,1058],{"class":146,"line":185},[144,1034,1035],{"class":382},"  --motion-ease",[144,1037,274],{"class":150},[144,1039,1040],{"class":158},"cubic-bezier",[144,1042,379],{"class":150},[144,1044,838],{"class":158},[144,1046,292],{"class":150},[144,1048,1049],{"class":158},"0",[144,1051,292],{"class":150},[144,1053,1049],{"class":158},[144,1055,292],{"class":150},[144,1057,345],{"class":158},[144,1059,390],{"class":150},[144,1061,1062],{"class":146,"line":195},[144,1063,947],{"class":150},[144,1065,1066],{"class":146,"line":213},[144,1067,318],{"emptyLinePlaceholder":317},[144,1069,1070,1073],{"class":146,"line":238},[144,1071,1072],{"class":280},"@media",[144,1074,1075],{"class":150}," (prefers-reduced-motion: reduce) {\n",[144,1077,1078,1081,1083,1085,1087,1089,1091],{"class":146,"line":252},[144,1079,1080],{"class":158},"  :root",[144,1082,268],{"class":150},[144,1084,465],{"class":382},[144,1086,274],{"class":150},[144,1088,345],{"class":158},[144,1090,473],{"class":280},[144,1092,311],{"class":150},[144,1094,1095],{"class":146,"line":262},[144,1096,947],{"class":150},[144,1098,1099],{"class":146,"line":314},[144,1100,318],{"emptyLinePlaceholder":317},[144,1102,1103,1106],{"class":146,"line":321},[144,1104,1105],{"class":158},".drawer",[144,1107,334],{"class":150},[144,1109,1110],{"class":146,"line":328},[144,1111,1112],{"class":324},"  \u002F* Component-specific: slower, but still derived from the global token. *\u002F\n",[144,1114,1115,1118,1120,1123,1125,1127,1129,1131,1133,1136,1139],{"class":146,"line":337},[144,1116,1117],{"class":382},"  --_drawer-duration",[144,1119,274],{"class":150},[144,1121,1122],{"class":158},"calc",[144,1124,379],{"class":150},[144,1126,376],{"class":158},[144,1128,379],{"class":150},[144,1130,465],{"class":382},[144,1132,537],{"class":150},[144,1134,1135],{"class":280},"*",[144,1137,1138],{"class":158}," 1.75",[144,1140,390],{"class":150},[144,1142,1143,1146,1149,1151,1153,1156,1158,1160,1162,1165],{"class":146,"line":353},[144,1144,1145],{"class":158},"  transition",[144,1147,1148],{"class":150},": translate ",[144,1150,376],{"class":158},[144,1152,379],{"class":150},[144,1154,1155],{"class":382},"--_drawer-duration",[144,1157,537],{"class":150},[144,1159,376],{"class":158},[144,1161,379],{"class":150},[144,1163,1164],{"class":382},"--motion-ease",[144,1166,390],{"class":150},[144,1168,1169],{"class":146,"line":368},[144,1170,947],{"class":150},[14,1172,1173,1174,1177,1178,1180],{},"The drawer's private duration is derived from the global token rather than replacing it. That keeps reduced motion working — ",[18,1175,1176],{},"1ms * 1.75"," is still effectively instant — and it keeps the drawer's slower speed from leaking into the buttons inside it, because the buttons read ",[18,1179,465],{},", which the drawer never changes.",[46,1182,1184],{"id":1183},"naming-conventions-that-help","Naming conventions that help",[14,1186,1187],{},"A consistent naming scheme makes leaks easier to spot in code review:",[1189,1190,1191,1207,1217],"ul",{},[1192,1193,1194,274,1198,292,1201,1203,1204,1206],"li",{},[1195,1196,1197],"strong",{},"Global tokens",[18,1199,1200],{},"--color-accent",[18,1202,465],{},". Set on ",[18,1205,24],{},", read anywhere.",[1192,1208,1209,274,1212,292,1214,1216],{},[1195,1210,1211],{},"Component inputs",[18,1213,28],{},[18,1215,456],{},". Set by consumers, read only by the component root.",[1192,1218,1219,274,1222,292,1224,1226],{},[1195,1220,1221],{},"Private values",[18,1223,516],{},[18,1225,534],{},". Set and read only inside the component.",[14,1228,1229],{},"When a component rule reads an input directly in a style declaration rather than through its private value, that is a candidate leak. When anything outside a component sets an underscored property, that is a boundary violation.",[46,1231,1233],{"id":1232},"different-components-same-name","Different components, same name",[14,1235,1236,1237,292,1240,292,1243,1245,1246,1248,1249,1252,1253,292,1256,1259],{},"Leaks are not limited to nested instances of one component. Two unrelated components that both read a generic name — ",[18,1238,1239],{},"--bg",[18,1241,1242],{},"--gap",[18,1244,32],{}," — interfere whenever one is placed inside the other. A tooltip reading ",[18,1247,32],{}," inside a drawer that sets ",[18,1250,1251],{},"--duration: 400ms"," suddenly fades in slowly, and nothing in the tooltip's own code explains why. Prefixing every input with the component name (",[18,1254,1255],{},"--tooltip-duration",[18,1257,1258],{},"--drawer-duration",") removes the collision entirely, and it makes DevTools output readable: the Computed pane lists custom properties by name, and a list of prefixed names shows at a glance which component each value belongs to.",[14,1261,1262,1263,1266,1267,1269,1270,1272],{},"Generic names are fine for true global tokens that every component is ",[884,1264,1265],{},"meant"," to share. The distinction is intent: ",[18,1268,465],{}," is shared on purpose, and a component that reads it expects any ancestor to be able to change it. ",[18,1271,32],{}," is ambiguous, and ambiguity is where leaks come from.",[46,1274,1276],{"id":1275},"testing-for-leaks","Testing for leaks",[14,1278,1279],{},"A simple test catches most leaks before they ship: render every component nested inside every other component that sets custom properties, with the outer one customised, and compare against the component on its own. Visual regression tools make this cheap. When a nested render differs, the difference names the leaking property. For motion, the equivalent test is to hover or open each nested component and check that its timing matches the standalone version.",[46,1281,1283],{"id":1282},"browser-support","Browser support",[14,1285,1286,1287,1289,1290,1292,1293,1296,1297,1300],{},"Custom properties and inheritance behave the same in every current browser. ",[18,1288,896],{}," is supported in Chrome and Edge 85+, Firefox 128+ and Safari 16.4+; in browsers without it, a registered property falls back to ordinary inheriting behaviour, so pair ",[18,1291,900],{}," with the reset pattern if older browsers matter. ",[18,1294,1295],{},"prefers-reduced-motion"," is supported in Chrome 74+, Edge 79+, Firefox 63+ and Safari 10.1+, and ",[18,1298,1299],{},"@layer"," in Chrome and Edge 99+, Firefox 97+ and Safari 15.4+.",[46,1302,1304],{"id":1303},"faq","FAQ",[14,1306,1307,1310],{},[1195,1308,1309],{},"Why does a custom property set on a parent change a nested component?","\nCustom properties inherit by default. A value set on an outer card is visible to every descendant, including a nested card that reads the same property name, unless the nested component sets or resets it itself.",[14,1312,1313,1316,1317,1319,1320,1323,1324,1326],{},[1195,1314,1315],{},"What is the public and private custom property pattern?","\nComponents read a private property such as ",[18,1318,516],{},", defined on the component root as ",[18,1321,1322],{},"var(--card-bg, default)",". Consumers set the public ",[18,1325,28],{},". Nested component roots reset the public input, so an outer value never reaches a nested component unless it is set on that component itself.",[14,1328,1329,1332,1333,1335,1336,1338],{},[1195,1330,1331],{},"Does inherits: false stop custom properties leaking?","\nYes. A property registered with ",[18,1334,896],{}," and ",[18,1337,900],{}," is not passed to descendants; each element gets the initial value unless it is set on that element. It is the strongest isolation, at the cost of needing to set the value on exactly the element that uses it.",[14,1340,1341,1344],{},[1195,1342,1343],{},"Should animation durations be scoped per component?","\nGlobal motion tokens should inherit so a single reduced-motion override reaches everything. Component-specific tweaks, such as a slower drawer, belong in a private property that falls back to the global token.",[46,1346,1348],{"id":1347},"related","Related",[1189,1350,1351,1356,1363,1370],{},[1192,1352,1353,1355],{},[35,1354,38],{"href":37}," — the parent guide.",[1192,1357,1358,1362],{},[35,1359,1361],{"href":1360},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fcustom-property-fallbacks-and-invalid-values\u002F","Custom Property Fallbacks and Invalid Values"," — what happens when inputs are wrong.",[1192,1364,1365,1369],{},[35,1366,1368],{"href":1367},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fregistered-properties-and-type-safety\u002F","Registered Properties and Type Safety"," — the @property rule in depth.",[1192,1371,1372,1376],{},[35,1373,1375],{"href":1374},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcss-scope-for-component-styles\u002F","@scope for Component Styles"," — scoping selectors as well as values.",[257,1378,1379],{},"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);}html pre.shiki code .sh5d0, html code.shiki .sh5d0{--shiki-default:#6E011A;--shiki-default-font-style:italic;--shiki-dark:#FFB1AF;--shiki-dark-font-style:italic}",{"title":140,"searchDepth":165,"depth":165,"links":1381},[1382,1383,1384,1385,1386,1387,1388,1389,1390,1391,1392],{"id":48,"depth":165,"text":49},{"id":125,"depth":165,"text":126},{"id":801,"depth":165,"text":802},{"id":890,"depth":165,"text":891},{"id":999,"depth":165,"text":1000},{"id":1183,"depth":165,"text":1184},{"id":1232,"depth":165,"text":1233},{"id":1275,"depth":165,"text":1276},{"id":1282,"depth":165,"text":1283},{"id":1303,"depth":165,"text":1304},{"id":1347,"depth":165,"text":1348},"Stop custom properties leaking into nested components: public and private property naming, inherits: false, resetting at the component root, and motion tokens.","md",{"pageTitle":5,"datePublished":1396,"dateModified":1396,"faq":1397},"2026-09-18",[1398,1400,1402,1404],{"q":1309,"a":1399},"Custom properties inherit by default. A value set on an outer card is visible to every descendant, including a nested card that reads the same property name, unless the nested component sets or resets it itself.",{"q":1315,"a":1401},"Components read a private property such as --_card-bg, defined on the component root as var(--card-bg, default). Consumers set the public --card-bg. Nested component roots reset the public input, so an outer value never reaches a nested component unless it is set on that component itself.",{"q":1331,"a":1403},"Yes. A property registered with @property and inherits: false is not passed to descendants; each element gets the initial value unless it is set on that element. It is the strongest isolation, at the cost of needing to set the value on exactly the element that uses it.",{"q":1343,"a":1405},"Global motion tokens should inherit so a single reduced-motion override reaches everything. Component-specific tweaks, such as a slower drawer, belong in a private property that falls back to the global token.","\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fscoping-custom-properties-to-components",{"title":5,"description":1393},"css-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fscoping-custom-properties-to-components\u002Findex","G-UKgsZFp5KXQDCUzUJsraljBiC36QMW2ESqtD5KsYI",[1411,1414,1417,1420,1423,1426,1429,1432,1435,1438,1441,1444,1447,1450,1453,1456,1459,1462,1465,1468,1471,1474,1477,1480,1483,1486,1489,1492,1495,1498,1501,1504,1506,1509,1512,1515,1516,1519,1522,1525,1528,1531,1534,1537,1540,1543,1546,1549,1552,1555,1558,1561,1564,1567,1570,1573,1576,1579,1582,1585,1588,1591,1594,1597,1600,1603,1606,1609,1612,1615,1618,1621,1624,1627,1630,1633,1636,1639,1642,1645,1648,1651,1654,1657,1660,1663,1666,1669,1672,1675,1678,1681,1684,1687,1689,1692,1695,1698,1701,1704,1707,1710,1713,1716,1719,1722,1725,1728,1731,1734,1737,1740,1743,1746,1749,1752,1755,1758,1761,1764,1767,1770,1773,1776,1779,1782,1785,1788,1791,1794,1797,1800,1803,1806,1809,1812,1815,1818,1821,1824,1827,1830,1833,1836,1839,1842,1845,1848,1851,1854,1857,1860,1863,1866,1869,1872,1875,1878,1881,1884,1887,1890,1893,1896,1899,1902,1905,1908,1911,1914,1917,1920,1923,1926,1929,1932,1935,1938,1941,1944,1947,1950,1953,1956,1959,1962,1965],{"path":1412,"title":1413},"\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":1415,"title":1416},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fflashing-content-and-seizure-thresholds","Flashing Content and Seizure Thresholds",{"path":1418,"title":1419},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fforced-colors-mode-and-animations","Forced Colors Mode and Animations",{"path":1421,"title":1422},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations","Accessibility in CSS Animations: Patterns, Specs & Best Practices",{"path":1424,"title":1425},"\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":1427,"title":1428},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fprefers-reduced-motion-recipes","prefers-reduced-motion Recipes: A Reduction for Every Common Effect",{"path":1430,"title":1431},"\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":1433,"title":1434},"\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":1436,"title":1437},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fvestibular-safe-animation-patterns","Vestibular-Safe Animation Patterns: Why Some Motion Makes People Sick",{"path":1439,"title":1440},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fwcag-motion-success-criteria","WCAG Motion Success Criteria: What Each One Actually Requires",{"path":1442,"title":1443},"\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":1445,"title":1446},"\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":1448,"title":1449},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations","Clip-Path & Mask Animations: Animating Visibility Instead of Position",{"path":1451,"title":1452},"\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":1454,"title":1455},"\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":1457,"title":1458},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fanimating-gradients","Animating CSS Gradients: Smooth Colour Motion Without Jumps",{"path":1460,"title":1461},"\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":1463,"title":1464},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions","Color & Theme Transitions: Colour as Part of the Motion System",{"path":1466,"title":1467},"\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":1469,"title":1470},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fsmooth-theme-switching-transitions","Smooth Theme Switching: Crossfades, Circular Reveals and No Flash",{"path":1472,"title":1473},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fcontainer-query-hover-affordances","Container Query Hover Affordances: When Narrow Means Persistent, Not Hidden",{"path":1475,"title":1476},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion","Container-Aware Motion: Animation Sized by the Space a Component Actually Has",{"path":1478,"title":1479},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Flayout-change-animations-at-container-breakpoints","Animating Changes at Container Breakpoints",{"path":1481,"title":1482},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fmotion-driven-by-container-style-queries","Motion Driven by Container Style Queries",{"path":1484,"title":1485},"\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":1487,"title":1488},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fsuppressing-motion-in-small-containers","Suppressing Motion in Small Containers: Deliberately Animating Nothing",{"path":1490,"title":1491},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fcontrolling-css-animations-from-javascript","Controlling CSS Animations From JavaScript",{"path":1493,"title":1494},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api","CSS Animation vs the Web Animations API: A Decision Guide",{"path":1496,"title":1497},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fwaapi-vs-css-for-interruptible-ui","Interruptible UI: CSS Transitions vs WAAPI",{"path":1499,"title":1500},"\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":1502,"title":1503},"\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":1505,"title":1361},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fcustom-property-fallbacks-and-invalid-values",{"path":1507,"title":1508},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Ffluid-spacing-tokens-driving-transition-durations","Fluid Spacing Tokens That Drive Transition Durations",{"path":1510,"title":1511},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture","CSS Custom Properties Architecture: Scalable Design Systems & Dynamic UI",{"path":1513,"title":1514},"\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":1406,"title":5},{"path":1517,"title":1518},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fcss-transition-timing-functions","CSS Transition Timing Functions: ease, cubic-bezier(), steps() and linear()",{"path":1520,"title":1521},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals","CSS Transition Fundamentals: Architecture, Performance & Patterns",{"path":1523,"title":1524},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Finterrupted-and-reversing-transitions","Interrupted and Reversing Transitions: What Happens Mid-Flight",{"path":1526,"title":1527},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fstarting-style-entry-animations","@starting-style: Animating an Element's Very First Style Change",{"path":1529,"title":1530},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-delay-choreography","Choreographing Motion With transition-delay",{"path":1532,"title":1533},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-shorthand-and-multiple-properties","The transition Shorthand and Multiple Properties",{"path":1535,"title":1536},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransitioning-display-with-allow-discrete","Transitioning display with transition-behavior: allow-discrete and @starting-style",{"path":1538,"title":1539},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fanimating-dialog-open-and-close","Animating \u003Cdialog> Open and Close: Both Directions, No Library",{"path":1541,"title":1542},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fbackdrop-animations","Animating ::backdrop: Fades and Blurs Behind Dialogs and Popovers",{"path":1544,"title":1545},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations","Dialog & Popover Animations: Motion for the Top Layer",{"path":1547,"title":1548},"\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":1550,"title":1551},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fpopover-entry-and-exit-transitions","Popover Menus That Animate From Their Anchor",{"path":1553,"title":1554},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fchoosing-animation-durations","Choosing Animation Durations: How Long Motion Should Last",{"path":1556,"title":1557},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fcubic-bezier-overshoot-and-anticipation","Overshoot and Anticipation With cubic-bezier(): Motion With Character",{"path":1559,"title":1560},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fentry-vs-exit-easing","Entry vs Exit Easing: Different Curves for Arriving and Leaving",{"path":1562,"title":1563},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design","Easing & Motion Design: Making CSS Motion Feel Intentional",{"path":1565,"title":1566},"\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":1568,"title":1569},"\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":1571,"title":1572},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Faccessible-css-only-tooltips","Accessible CSS-Only Tooltips and Hover Cards With  and ",{"path":1574,"title":1575},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fbutton-press-and-active-states","Button Press and  States",{"path":1577,"title":1578},"\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":1580,"title":1581},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Ffocus-within-form-patterns"," Form Patterns: Styling a Group From the Field Inside It",{"path":1583,"title":1584},"\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":1586,"title":1587},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design","Hover & Focus State Design: Spec-Compliant Patterns for Modern UIs",{"path":1589,"title":1590},"\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":1592,"title":1593},"\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":1595,"title":1596},"\u002Fcss-only-micro-interactions-animations","CSS-Only Micro-Interactions & Animations: Architecture, Performance & Implementation",{"path":1598,"title":1599},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fanimation-composition-and-stacking","Stacking Animations With animation-composition",{"path":1601,"title":1602},"\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":1604,"title":1605},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcontainer-query-triggered-keyframe-animations","Container-Query-Triggered Keyframe Animations: Animate Differently per Available Space",{"path":1607,"title":1608},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-accordions-and-disclosure","CSS-Only Accordions and Disclosure Widgets with details and summary",{"path":1610,"title":1611},"\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":1613,"title":1614},"\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":1616,"title":1617},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns","Keyframe Animation Patterns: Spec-Compliant Architectures for Modern UIs",{"path":1619,"title":1620},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fmulti-step-keyframes-and-per-keyframe-easing","Multi-Step Keyframes and Per-Keyframe Easing",{"path":1622,"title":1623},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fstaggered-list-animations-with-custom-properties","Staggered List Animations Using --i Index Custom Properties",{"path":1625,"title":1626},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fanimating-box-shadow-and-filters-cheaply","Animating box-shadow and Filters Cheaply",{"path":1628,"title":1629},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcontain-property-for-animation-performance","The contain Property for Animation Performance",{"path":1631,"title":1632},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcss-triggers-layout-paint-composite","Layout, Paint and Composite: What Triggers What",{"path":1634,"title":1635},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration","Performance & GPU Acceleration in CSS: A Developer’s Blueprint",{"path":1637,"title":1638},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Foptimizing-css-animations-for-60fps","Optimizing CSS Animations for 60fps: Budgeting the Frame",{"path":1640,"title":1641},"\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":1643,"title":1644},"\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":1646,"title":1647},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations","Scroll-Driven Animations: Binding Motion to Scroll Position in Pure CSS",{"path":1649,"title":1650},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-animation-fallbacks","Shipping Scroll-Driven Animations Without Breaking Anything",{"path":1652,"title":1653},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-parallax-effects","Scroll-Driven Parallax Effects in CSS",{"path":1655,"title":1656},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-progress-bar-without-javascript","A Reading Progress Bar Driven by scroll(root)",{"path":1658,"title":1659},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-triggered-reveal-animations","Reveal-on-Scroll with view() and animation-range",{"path":1661,"title":1662},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Ftimeline-scope-for-cross-element-animations","timeline-scope for Cross-Element Animations",{"path":1664,"title":1665},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fview-timeline-and-animation-range","View Timelines and animation-range",{"path":1667,"title":1668},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fcross-document-view-transitions","Cross-Document View Transitions",{"path":1670,"title":1671},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers","View Transitions for CSS Developers: the Pseudo-Element Tree, Snapshots, and Named Elements",{"path":1673,"title":1674},"\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":1676,"title":1677},"\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":1679,"title":1680},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transition-types-and-classes","View Transition Types and Classes",{"path":1682,"title":1683},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-for-list-reordering","View Transitions for List Reordering",{"path":1685,"title":1686},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-with-reduced-motion","Honouring prefers-reduced-motion in View Transitions",{"path":284,"title":1688},"Modern CSS Layouts & Micro-Interactions",{"path":1690,"title":1691},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioned-tooltips","Anchor-Positioned Tooltips: Tethering, Flipping, and Getting the Semantics Right",{"path":1693,"title":1694},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioning-fallbacks","Anchor Positioning Fallbacks: A Graceful Floor for Older Browser Versions",{"path":1696,"title":1697},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-size-for-matching-widths","anchor-size(): Overlays That Match Their Trigger's Size",{"path":1699,"title":1700},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays","CSS Anchor Positioning and Overlays: Tethering Elements Without JavaScript",{"path":1702,"title":1703},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-attribute-and-css-styling","The popover Attribute: Top-Layer Overlays With No JavaScript",{"path":1705,"title":1706},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-light-dismiss-and-stacking","Popover Light Dismiss, Nesting and Stacking",{"path":1708,"title":1709},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fposition-area-grid-explained","position-area: The Anchor Placement Grid",{"path":1711,"title":1712},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fcontainer-query-polyfill-tradeoffs","Container Query Polyfills: What They Cost and When to Skip Them",{"path":1714,"title":1715},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ffeature-detection-with-supports","Feature Detection with @supports: Syntax, Semantics, and the Traps",{"path":1717,"title":1718},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fhandling-container-query-fallbacks-for-older-browsers","Handling Container Query Fallbacks for Older Browsers",{"path":1720,"title":1721},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks","Container Query Fallbacks: Spec-Compliant CSS Strategies for Legacy Browsers",{"path":1723,"title":1724},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fintrinsic-layout-fallbacks-without-queries","Intrinsic Layout Fallbacks: Baselines That Adapt Without Any Query",{"path":1726,"title":1727},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ftesting-fallbacks-without-old-browsers","Testing CSS Fallbacks Without an Old Browser",{"path":1729,"title":1730},"\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":1732,"title":1733},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-query-range-and-logic-operators","Container Query Range Syntax and Logic Operators",{"path":1735,"title":1736},"\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":1738,"title":1739},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-type-size-vs-inline-size","Choosing container-type: inline-size, size, or normal",{"path":1741,"title":1742},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-vs-media-queries-comparison","Container vs Media Queries: Choosing the Right Reference Box",{"path":1744,"title":1745},"\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":1747,"title":1748},"\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":1750,"title":1751},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics","Container Query Syntax Basics",{"path":1753,"title":1754},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fnesting-and-naming-container-queries","Nesting and Naming Container Queries: Targeting the Right Ancestor",{"path":1756,"title":1757},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fauto-fit-minmax-responsive-grids","Responsive Grids with repeat(auto-fit, minmax())",{"path":1759,"title":1760},"\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":1762,"title":1763},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fgrid-auto-flow-dense-packing","grid-auto-flow: dense for Packed Layouts",{"path":1765,"title":1766},"\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":1768,"title":1769},"\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":1771,"title":1772},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts","CSS Grid and Subgrid Layouts for Responsive Interfaces",{"path":1774,"title":1775},"\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":1777,"title":1778},"\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":1780,"title":1781},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fsubgrid-vs-nested-grid","Subgrid vs an Independently Nested Grid",{"path":1783,"title":1784},"\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":1786,"title":1787},"\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":1789,"title":1790},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-grow-and-flex-shrink-explained","flex-grow and flex-shrink Explained",{"path":1792,"title":1793},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-wrap-intrinsic-responsive-rows","Breakpoint-Free Responsive Rows With flex-wrap and flex-basis",{"path":1795,"title":1796},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflexbox-gap-and-spacing","Flexbox gap vs Margins: Spacing Items Without Edge Hacks",{"path":1798,"title":1799},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns","Flexbox Layout Patterns: One-Dimensional Layout for Real Components",{"path":1801,"title":1802},"\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":1804,"title":1805},"\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":1807,"title":1808},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fdebugging-clamp-values","Debugging clamp(): Values That Are Ignored, Stuck or Never Fluid",{"path":1810,"title":1811},"\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":1813,"title":1814},"\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":1816,"title":1817},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-type-accessibility-and-zoom","Fluid Type, Accessibility and Zoom: The vw-Only Trap",{"path":1819,"title":1820},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-typography-without-javascript","Fluid Typography Without JavaScript: A Precision CSS Reference",{"path":1822,"title":1823},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp","Fluid Typography with clamp(): A Practical Guide for Modern CSS",{"path":1825,"title":1826},"\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":1828,"title":1829},"\u002Fmastering-container-queries-responsive-layouts","Mastering Container Queries & Responsive Layouts",{"path":1831,"title":1832},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Faspect-ratio-for-responsive-media","Using aspect-ratio for Responsive Media and Preventing Layout Shift",{"path":1834,"title":1835},"\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":1837,"title":1838},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques","Intrinsic Sizing Techniques: Modern CSS Layouts for Responsive UI",{"path":1840,"title":1841},"\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":1843,"title":1844},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fmin-max-fit-content-explained","min-content, max-content, and fit-content() Explained",{"path":1846,"title":1847},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fobject-fit-and-object-position","object-fit and object-position: Images That Fit Any Box",{"path":1849,"title":1850},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fpreventing-flex-and-grid-overflow","The min-width: auto Trap in Flex and Grid Layouts",{"path":1852,"title":1853},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-for-reset-and-tokens","Cascade Layers for Reset and Design Tokens",{"path":1855,"title":1856},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-vs-specificity-hacks","Cascade Layers vs Specificity Hacks: Ordering Instead of Escalating",{"path":1858,"title":1859},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcss-scope-for-component-styles","@scope for Component Styles: Short Selectors That Cannot Leak",{"path":1861,"title":1862},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies","Modern CSS Reset Strategies: A Spec-Compliant Foundation",{"path":1864,"title":1865},"\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":1867,"title":1868},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fwriting-a-minimal-modern-reset","Writing a Minimal Modern CSS Reset: Every Line Justified",{"path":1870,"title":1871},"\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":1873,"title":1874},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fempty-and-loading-states-with-has","Empty and Loading States With ()",{"path":1876,"title":1877},"\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":1879,"title":1880},"\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":1882,"title":1883},"\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":1885,"title":1886},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has","Parent-Aware Layouts With :has(): Letting Containers React to Their Contents",{"path":1888,"title":1889},"\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":1891,"title":1892},"\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":1894,"title":1895},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-data-tables","Container Query Data Tables: Reflowing Tables to Cards",{"path":1897,"title":1898},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-sidebar-layouts","Container Query Sidebar Layouts That Travel Between Contexts",{"path":1900,"title":1901},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns","Responsive Component Patterns: Architecture & Implementation",{"path":1903,"title":1904},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-forms-with-container-queries","Responsive Forms with Container Queries: Reflow Without Losing the Wiring",{"path":1906,"title":1907},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-hero-sections-with-container-queries","Responsive Hero Sections With Container Queries",{"path":1909,"title":1910},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-navigation-without-media-queries","Responsive Navigation Without Media Queries Using Container Queries",{"path":1912,"title":1913},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-pricing-tables","Responsive Pricing Tables: Aligned Features, a Clear Recommendation, Any Width",{"path":1915,"title":1916},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Ftabs-that-become-accordions","Tabs That Become an Accordion: One Component, Two Layouts",{"path":1918,"title":1919},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fcss-only-carousel-with-scroll-snap","A CSS-Only Carousel With Scroll Snap",{"path":1921,"title":1922},"\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":1924,"title":1925},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts","Scroll Snap & Overflow Layouts: Designing Components That Scroll on Purpose",{"path":1927,"title":1928},"\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":1930,"title":1931},"\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":1933,"title":1934},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fcombining-size-and-style-queries","Combining Size and Style Container Queries",{"path":1936,"title":1937},"\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":1939,"title":1940},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state","Style Queries and Container State: Token-Driven Component Variants",{"path":1942,"title":1943},"\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":1945,"title":1946},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fstyle-query-component-variants","Component Variants With Style Queries: One Token, Many Looks",{"path":1948,"title":1949},"\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":1951,"title":1952},"\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":1954,"title":1955},"\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":1957,"title":1958},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout","Viewport Units & Mobile Layout: Designing for the Screen You Actually Get",{"path":1960,"title":1961},"\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":1963,"title":1964},"\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":1966,"title":1967},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Fvirtual-keyboard-and-interactive-widget","Layouts That Survive the Virtual Keyboard",{"title":1969,"caption":1970,"height":1971,"html":1972,"css":1973},"A leaky component next to a scoped one","Both outer cards are customised with an amber background. The leaky inner card inherits it; the scoped inner card resets its input and keeps its default.",260,"\n\u003Cdiv class=\"grid\">\n  \u003Cdiv class=\"card-leaky\" style=\"--card-bg: #fde68a\">\n    \u003Cstrong>Outer (leaky)\u003C\u002Fstrong>\n    \u003Cdiv class=\"card-leaky\">Inner inherits amber\u003C\u002Fdiv>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"card card--highlight\">\n    \u003Cstrong>Outer (scoped)\u003C\u002Fstrong>\n    \u003Cdiv class=\"card\">Inner keeps its default\u003C\u002Fdiv>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>","\n.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; padding: 1rem; }\n.card-leaky { padding: 1rem; border-radius: 10px; background: var(--card-bg, #f1f5f9); color: #0f172a; display: grid; gap: 0.75rem; border: 1px solid #cbd5e1; }\n.card { --_card-bg: var(--card-bg, #f1f5f9); padding: 1rem; border-radius: 10px; background: var(--_card-bg); color: #0f172a; display: grid; gap: 0.75rem; border: 1px solid #cbd5e1; }\n.card--highlight { --card-bg: #fde68a; }\n:where(.card .card) { --card-bg: initial; }",1789717749902]