[{"data":1,"prerenderedAt":1764},["ShallowReactive",2],{"page-\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcss-triggers-layout-paint-composite":3,"content-all-pages":1201,"live-demo:pipeline-swaps":1758},{"id":4,"title":5,"body":6,"description":1184,"extension":1185,"meta":1186,"navigation":392,"path":1197,"seo":1198,"stem":1199,"__hash__":1200},"content\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcss-triggers-layout-paint-composite\u002Findex.md","Layout, Paint and Composite: What Triggers What",{"type":7,"value":8,"toc":1170},"minimark",[9,13,28,33,53,153,157,224,228,266,270,290,294,303,307,911,914,918,921,1006,1010,1026,1033,1037,1058,1062,1070,1074,1089,1093,1111,1117,1126,1132,1136,1166],[10,11,5],"h1",{"id":12},"layout-paint-and-composite-what-triggers-what",[14,15,16,17,22,23,27],"p",{},"Every frame the browser draws goes through a pipeline: recalculate styles, lay out boxes, paint pixels into layers, and composite those layers onto the screen. An animation's cost depends on how early in that pipeline its property forces work to restart. Animate a property that affects geometry and the browser redoes layout, paint and composite sixty times a second. Animate one that only affects how an already-painted layer is placed and blended, and it can skip straight to compositing — often on a separate thread, unaffected by whatever JavaScript is running. Knowing which properties land where turns \"why is this janky?\" into a short checklist. This page belongs to ",[18,19,21],"a",{"href":20},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002F","Performance & GPU Acceleration"," in the ",[18,24,26],{"href":25},"\u002Fcss-only-micro-interactions-animations\u002F","CSS-Only Micro-Interactions & Animations"," guide.",[29,30,32],"h2",{"id":31},"the-rendering-pipeline","The rendering pipeline",[14,34,35,36,40,41,44,45,48,49,52],{},"The stages run in order. ",[37,38,39],"strong",{},"Style"," works out which rules apply and computes values. ",[37,42,43],{},"Layout"," turns boxes into positions and sizes. ",[37,46,47],{},"Paint"," records drawing operations — text, backgrounds, borders, shadows — for each layer. ",[37,50,51],{},"Composite"," takes the painted layers and assembles them, applying transforms and opacity, into the final frame. A change enters the pipeline at the earliest stage it affects and flows through every stage after it.",[54,55,61,62,61,66,61,70,61,78,61,89,61,92,61,95,61,98,61,103,61,106,61,109,61,112,61,119,61,125,61,129,61,134,61,139,61,143,61,149],"svg",{"viewBox":56,"role":57,"ariaLabel":58,"xmlns":59,"style":60},"0 0 720 300","img","The rendering pipeline: style, layout, paint and composite, with three entry points showing that geometry changes restart at layout, visual changes at paint, and transform or opacity at composite","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","width:100%;height:auto;max-width:720px;margin:2rem 0","\n  ",[63,64,65],"title",{},"Where each change enters the pipeline",[67,68,69],"desc",{},"Four boxes in a row: style, layout, paint, composite. Three bars underneath. The first, labelled width, top, margin, font-size, spans from layout to composite. The second, labelled background-color, color, box-shadow, spans paint and composite. The third, labelled transform and opacity, covers only composite.",[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 later a change enters, the cheaper it is",[79,80],"rect",{"x":81,"y":82,"width":83,"height":84,"rx":85,"fill":86,"stroke":87,"strokeWidth":88},"40","56","140","50","8","none","currentColor","1.5",[79,90],{"x":91,"y":82,"width":83,"height":84,"rx":85,"fill":86,"stroke":87,"strokeWidth":88},"210",[79,93],{"x":94,"y":82,"width":83,"height":84,"rx":85,"fill":86,"stroke":87,"strokeWidth":88},"380",[79,96],{"x":97,"y":82,"width":83,"height":84,"rx":85,"fill":86,"stroke":87,"strokeWidth":88},"550",[71,99,39],{"textAnchor":73,"x":100,"y":101,"style":102},"110","86","text-anchor:middle;fill:currentColor;font:600 14px sans-serif",[71,104,43],{"textAnchor":73,"x":105,"y":101,"style":102},"280",[71,107,47],{"textAnchor":73,"x":108,"y":101,"style":102},"450",[71,110,51],{"textAnchor":73,"x":111,"y":101,"style":102},"620",[79,113],{"x":91,"y":114,"width":115,"height":116,"rx":117,"fill":87,"opacity":118},"130","480","34","6","0.15",[79,120],{"x":94,"y":121,"width":122,"height":116,"rx":117,"fill":123,"opacity":124},"180","310","#7aa2ff","0.3",[79,126],{"x":97,"y":127,"width":83,"height":116,"rx":117,"fill":123,"opacity":128},"230","0.55",[71,130,133],{"textAnchor":73,"x":108,"y":131,"style":132},"152","text-anchor:middle;fill:currentColor;font:12px ui-monospace,monospace","width, top, margin, padding, font-size",[71,135,138],{"textAnchor":73,"x":136,"y":137,"style":132},"535","202","background-color, box-shadow",[71,140,142],{"textAnchor":73,"x":111,"y":141,"style":132},"252","transform, opacity",[71,144,148],{"textAnchor":145,"x":146,"y":131,"style":147},"end","190","text-anchor:end;fill:currentColor;font:11px sans-serif","most expensive",[71,150,152],{"textAnchor":145,"x":151,"y":141,"style":147},"530","cheapest",[29,154,156],{"id":155},"layout-triggers","Layout triggers",[14,158,159,160,164,165,164,168,171,172,175,176,164,179,164,182,164,185,188,189,188,192,188,195,198,199,164,202,164,205,164,208,164,211,164,214,164,217,164,220,223],{},"Anything that changes the size or position of a box in the flow triggers layout: ",[161,162,163],"code",{},"width",", ",[161,166,167],{},"height",[161,169,170],{},"min-*"," and ",[161,173,174],{},"max-*"," sizes, ",[161,177,178],{},"padding",[161,180,181],{},"margin",[161,183,184],{},"border-width",[161,186,187],{},"top","\u002F",[161,190,191],{},"right",[161,193,194],{},"bottom",[161,196,197],{},"left"," on positioned elements, ",[161,200,201],{},"inset",[161,203,204],{},"font-size",[161,206,207],{},"line-height",[161,209,210],{},"letter-spacing",[161,212,213],{},"display",[161,215,216],{},"flex-basis",[161,218,219],{},"grid-template-columns",[161,221,222],{},"gap",", and changes to text content. Layout is rarely confined to the element itself; a height change pushes everything below it, and a width change can re-wrap text in every descendant. The cost scales with how much of the page is affected, which is why the same animation can be smooth on a demo page and janky in a real app.",[29,225,227],{"id":226},"paint-triggers","Paint triggers",[14,229,230,231,164,234,164,237,171,240,164,243,164,246,164,249,164,252,164,255,258,259,171,262,265],{},"Properties that change how a box looks without changing its geometry trigger paint but skip layout: ",[161,232,233],{},"color",[161,235,236],{},"background-color",[161,238,239],{},"background-image",[161,241,242],{},"background-position",[161,244,245],{},"border-color",[161,247,248],{},"border-radius",[161,250,251],{},"box-shadow",[161,253,254],{},"text-shadow",[161,256,257],{},"outline",", and in most engines ",[161,260,261],{},"filter",[161,263,264],{},"clip-path",". Paint cost is proportional to the painted area and complexity. A colour change on a 40-pixel button is trivial; an animated blur shadow on a full-screen panel repaints hundreds of thousands of pixels per frame.",[29,267,269],{"id":268},"composite-only-properties","Composite-only properties",[14,271,272,275,276,164,279,171,282,285,286,289],{},[161,273,274],{},"transform"," and the standalone ",[161,277,278],{},"translate",[161,280,281],{},"rotate",[161,283,284],{},"scale"," properties, together with ",[161,287,288],{},"opacity",", can be applied by the compositor to an existing layer. When an element with one of these animations is on its own compositor layer, the browser runs the animation on the compositor thread. The main thread can be busy parsing JSON or running a framework update, and the animation still advances every frame.",[29,291,293],{"id":292},"the-complete-implementation-swapping-expensive-properties","The complete implementation: swapping expensive properties",[14,295,296,297,299,300,302],{},"The demo shows one of the swaps below: the left card animates ",[161,298,251],{}," directly, and the right card fades a pre-painted shadow with ",[161,301,288],{},". They look nearly identical, which is the point — the difference only shows in the work the browser does per frame. The code block adds two more swaps, for a panel height and a positioned toast.",[304,305],"live-demo",{"name":306},"pipeline-swaps",[308,309,314],"pre",{"className":310,"code":311,"language":312,"meta":313,"style":313},"language-css shiki shiki-themes github-light-high-contrast github-dark-high-contrast","\u002F* Expensive: layout on every frame. *\u002F\n.panel-slow {\n  transition: height 300ms ease-out;\n}\n.panel-slow.is-open { height: 12rem; }\n\n\u002F* Cheaper: the box keeps its full size in layout; only its rendering scales.\n   Siblings do not move, so this suits overlays and drop-downs, not accordions. *\u002F\n.panel-fast {\n  transform-origin: top;\n  scale: 1 0;\n  transition: scale 300ms ease-out;\n}\n.panel-fast.is-open { scale: 1 1; }\n\n\u002F* Expensive: repaints a large blurred shadow every frame. *\u002F\n.card-slow {\n  transition: box-shadow 200ms ease-out;\n}\n.card-slow:hover { box-shadow: 0 12px 32px rgb(0 0 0 \u002F 0.25); }\n\n\u002F* Cheaper: the shadow is painted once on a pseudo-element; hover fades it in. *\u002F\n.card-fast { position: relative; }\n.card-fast::after {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  border-radius: inherit;\n  box-shadow: 0 12px 32px rgb(0 0 0 \u002F 0.25);\n  opacity: 0;\n  transition: opacity 200ms ease-out;\n  pointer-events: none;\n}\n.card-fast:hover::after { opacity: 1; }\n\n\u002F* Expensive: top triggers layout for a positioned element. *\u002F\n.toast-slow { position: fixed; top: -4rem; transition: top 250ms ease-out; }\n.toast-slow.is-shown { top: 1rem; }\n\n\u002F* Cheaper: translate moves the already-painted layer. *\u002F\n.toast-fast { position: fixed; top: 1rem; translate: 0 -5rem; transition: translate 250ms ease-out; }\n.toast-fast.is-shown { translate: 0 0; }\n","css","",[161,315,316,325,336,358,364,387,394,400,406,414,426,442,458,463,482,487,493,501,518,523,570,575,581,599,607,621,634,646,659,694,706,722,734,739,755,760,766,811,829,834,840,893],{"__ignoreMap":313},[317,318,321],"span",{"class":319,"line":320},"line",1,[317,322,324],{"class":323},"sLBg1","\u002F* Expensive: layout on every frame. *\u002F\n",[317,326,328,332],{"class":319,"line":327},2,[317,329,331],{"class":330},"s-5SL",".panel-slow",[317,333,335],{"class":334},"suds8"," {\n",[317,337,339,342,345,348,352,355],{"class":319,"line":338},3,[317,340,341],{"class":330},"  transition",[317,343,344],{"class":334},": height ",[317,346,347],{"class":330},"300",[317,349,351],{"class":350},"sHUrx","ms",[317,353,354],{"class":330}," ease-out",[317,356,357],{"class":334},";\n",[317,359,361],{"class":319,"line":360},4,[317,362,363],{"class":334},"}\n",[317,365,367,370,373,375,378,381,384],{"class":319,"line":366},5,[317,368,369],{"class":330},".panel-slow.is-open",[317,371,372],{"class":334}," { ",[317,374,167],{"class":330},[317,376,377],{"class":334},": ",[317,379,380],{"class":330},"12",[317,382,383],{"class":350},"rem",[317,385,386],{"class":334},"; }\n",[317,388,390],{"class":319,"line":389},6,[317,391,393],{"emptyLinePlaceholder":392},true,"\n",[317,395,397],{"class":319,"line":396},7,[317,398,399],{"class":323},"\u002F* Cheaper: the box keeps its full size in layout; only its rendering scales.\n",[317,401,403],{"class":319,"line":402},8,[317,404,405],{"class":323},"   Siblings do not move, so this suits overlays and drop-downs, not accordions. *\u002F\n",[317,407,409,412],{"class":319,"line":408},9,[317,410,411],{"class":330},".panel-fast",[317,413,335],{"class":334},[317,415,417,420,422,424],{"class":319,"line":416},10,[317,418,419],{"class":330},"  transform-origin",[317,421,377],{"class":334},[317,423,187],{"class":330},[317,425,357],{"class":334},[317,427,429,432,434,437,440],{"class":319,"line":428},11,[317,430,431],{"class":330},"  scale",[317,433,377],{"class":334},[317,435,436],{"class":330},"1",[317,438,439],{"class":330}," 0",[317,441,357],{"class":334},[317,443,445,447,450,452,454,456],{"class":319,"line":444},12,[317,446,341],{"class":330},[317,448,449],{"class":334},": scale ",[317,451,347],{"class":330},[317,453,351],{"class":350},[317,455,354],{"class":330},[317,457,357],{"class":334},[317,459,461],{"class":319,"line":460},13,[317,462,363],{"class":334},[317,464,466,469,471,473,475,477,480],{"class":319,"line":465},14,[317,467,468],{"class":330},".panel-fast.is-open",[317,470,372],{"class":334},[317,472,284],{"class":330},[317,474,377],{"class":334},[317,476,436],{"class":330},[317,478,479],{"class":330}," 1",[317,481,386],{"class":334},[317,483,485],{"class":319,"line":484},15,[317,486,393],{"emptyLinePlaceholder":392},[317,488,490],{"class":319,"line":489},16,[317,491,492],{"class":323},"\u002F* Expensive: repaints a large blurred shadow every frame. *\u002F\n",[317,494,496,499],{"class":319,"line":495},17,[317,497,498],{"class":330},".card-slow",[317,500,335],{"class":334},[317,502,504,506,509,512,514,516],{"class":319,"line":503},18,[317,505,341],{"class":330},[317,507,508],{"class":334},": box-shadow ",[317,510,511],{"class":330},"200",[317,513,351],{"class":350},[317,515,354],{"class":330},[317,517,357],{"class":334},[317,519,521],{"class":319,"line":520},19,[317,522,363],{"class":334},[317,524,526,529,531,533,535,538,541,544,547,549,552,555,557,559,561,564,567],{"class":319,"line":525},20,[317,527,528],{"class":330},".card-slow:hover",[317,530,372],{"class":334},[317,532,251],{"class":330},[317,534,377],{"class":334},[317,536,537],{"class":330},"0",[317,539,540],{"class":330}," 12",[317,542,543],{"class":350},"px",[317,545,546],{"class":330}," 32",[317,548,543],{"class":350},[317,550,551],{"class":330}," rgb",[317,553,554],{"class":334},"(",[317,556,537],{"class":330},[317,558,439],{"class":330},[317,560,439],{"class":330},[317,562,563],{"class":334}," \u002F ",[317,565,566],{"class":330},"0.25",[317,568,569],{"class":334},"); }\n",[317,571,573],{"class":319,"line":572},21,[317,574,393],{"emptyLinePlaceholder":392},[317,576,578],{"class":319,"line":577},22,[317,579,580],{"class":323},"\u002F* Cheaper: the shadow is painted once on a pseudo-element; hover fades it in. *\u002F\n",[317,582,584,587,589,592,594,597],{"class":319,"line":583},23,[317,585,586],{"class":330},".card-fast",[317,588,372],{"class":334},[317,590,591],{"class":330},"position",[317,593,377],{"class":334},[317,595,596],{"class":330},"relative",[317,598,386],{"class":334},[317,600,602,605],{"class":319,"line":601},24,[317,603,604],{"class":330},".card-fast::after",[317,606,335],{"class":334},[317,608,610,613,615,619],{"class":319,"line":609},25,[317,611,612],{"class":330},"  content",[317,614,377],{"class":334},[317,616,618],{"class":617},"sT6z2","\"\"",[317,620,357],{"class":334},[317,622,624,627,629,632],{"class":319,"line":623},26,[317,625,626],{"class":330},"  position",[317,628,377],{"class":334},[317,630,631],{"class":330},"absolute",[317,633,357],{"class":334},[317,635,637,640,642,644],{"class":319,"line":636},27,[317,638,639],{"class":330},"  inset",[317,641,377],{"class":334},[317,643,537],{"class":330},[317,645,357],{"class":334},[317,647,649,652,654,657],{"class":319,"line":648},28,[317,650,651],{"class":330},"  border-radius",[317,653,377],{"class":334},[317,655,656],{"class":330},"inherit",[317,658,357],{"class":334},[317,660,662,665,667,669,671,673,675,677,679,681,683,685,687,689,691],{"class":319,"line":661},29,[317,663,664],{"class":330},"  box-shadow",[317,666,377],{"class":334},[317,668,537],{"class":330},[317,670,540],{"class":330},[317,672,543],{"class":350},[317,674,546],{"class":330},[317,676,543],{"class":350},[317,678,551],{"class":330},[317,680,554],{"class":334},[317,682,537],{"class":330},[317,684,439],{"class":330},[317,686,439],{"class":330},[317,688,563],{"class":334},[317,690,566],{"class":330},[317,692,693],{"class":334},");\n",[317,695,697,700,702,704],{"class":319,"line":696},30,[317,698,699],{"class":330},"  opacity",[317,701,377],{"class":334},[317,703,537],{"class":330},[317,705,357],{"class":334},[317,707,709,711,714,716,718,720],{"class":319,"line":708},31,[317,710,341],{"class":330},[317,712,713],{"class":334},": opacity ",[317,715,511],{"class":330},[317,717,351],{"class":350},[317,719,354],{"class":330},[317,721,357],{"class":334},[317,723,725,728,730,732],{"class":319,"line":724},32,[317,726,727],{"class":330},"  pointer-events",[317,729,377],{"class":334},[317,731,86],{"class":330},[317,733,357],{"class":334},[317,735,737],{"class":319,"line":736},33,[317,738,363],{"class":334},[317,740,742,745,747,749,751,753],{"class":319,"line":741},34,[317,743,744],{"class":330},".card-fast:hover::after",[317,746,372],{"class":334},[317,748,288],{"class":330},[317,750,377],{"class":334},[317,752,436],{"class":330},[317,754,386],{"class":334},[317,756,758],{"class":319,"line":757},35,[317,759,393],{"emptyLinePlaceholder":392},[317,761,763],{"class":319,"line":762},36,[317,764,765],{"class":323},"\u002F* Expensive: top triggers layout for a positioned element. *\u002F\n",[317,767,769,772,774,776,778,781,784,786,788,791,793,795,798,800,802,805,807,809],{"class":319,"line":768},37,[317,770,771],{"class":330},".toast-slow",[317,773,372],{"class":334},[317,775,591],{"class":330},[317,777,377],{"class":334},[317,779,780],{"class":330},"fixed",[317,782,783],{"class":334},"; ",[317,785,187],{"class":330},[317,787,377],{"class":334},[317,789,790],{"class":330},"-4",[317,792,383],{"class":350},[317,794,783],{"class":334},[317,796,797],{"class":330},"transition",[317,799,377],{"class":334},[317,801,187],{"class":330},[317,803,804],{"class":330}," 250",[317,806,351],{"class":350},[317,808,354],{"class":330},[317,810,386],{"class":334},[317,812,814,817,819,821,823,825,827],{"class":319,"line":813},38,[317,815,816],{"class":330},".toast-slow.is-shown",[317,818,372],{"class":334},[317,820,187],{"class":330},[317,822,377],{"class":334},[317,824,436],{"class":330},[317,826,383],{"class":350},[317,828,386],{"class":334},[317,830,832],{"class":319,"line":831},39,[317,833,393],{"emptyLinePlaceholder":392},[317,835,837],{"class":319,"line":836},40,[317,838,839],{"class":323},"\u002F* Cheaper: translate moves the already-painted layer. *\u002F\n",[317,841,843,846,848,850,852,854,856,858,860,862,864,866,868,870,872,875,877,879,881,884,887,889,891],{"class":319,"line":842},41,[317,844,845],{"class":330},".toast-fast",[317,847,372],{"class":334},[317,849,591],{"class":330},[317,851,377],{"class":334},[317,853,780],{"class":330},[317,855,783],{"class":334},[317,857,187],{"class":330},[317,859,377],{"class":334},[317,861,436],{"class":330},[317,863,383],{"class":350},[317,865,783],{"class":334},[317,867,278],{"class":330},[317,869,377],{"class":334},[317,871,537],{"class":330},[317,873,874],{"class":330}," -5",[317,876,383],{"class":350},[317,878,783],{"class":334},[317,880,797],{"class":330},[317,882,883],{"class":334},": translate ",[317,885,886],{"class":330},"250",[317,888,351],{"class":350},[317,890,354],{"class":330},[317,892,386],{"class":334},[317,894,896,899,901,903,905,907,909],{"class":319,"line":895},42,[317,897,898],{"class":330},".toast-fast.is-shown",[317,900,372],{"class":334},[317,902,278],{"class":330},[317,904,377],{"class":334},[317,906,537],{"class":330},[317,908,439],{"class":330},[317,910,386],{"class":334},[14,912,913],{},"Each swap trades a pipeline stage for a composite-only operation. The height animation becomes a scale; the shadow animation becomes an opacity fade of a pre-painted shadow; the positional slide becomes a translate. Visually they are close. Under load, the second version of each stays smooth while the first stutters.",[29,915,917],{"id":916},"the-key-technique-animate-the-result-not-the-cause","The key technique: animate the result, not the cause",[14,919,920],{},"The pattern behind every swap is to paint the end state once and animate how it is displayed. The shadow exists at full strength from the start — only its opacity changes. The toast is always at its final position in layout — only its translation changes. This does cost something: the pre-painted layer uses memory, and a scaled element's content stretches unless it is counter-scaled. Those costs are paid once, not every frame.",[54,922,61,925,61,928,61,931,61,934,61,939,61,943,61,949,61,951,61,953,61,956,61,959,61,965,61,968,61,971,61,974,61,977,61,980,61,983,61,985,61,987,61,989,61,993,61,996,61,998,61,1000,61,1002],{"viewBox":923,"role":57,"ariaLabel":924,"xmlns":59,"style":60},"0 0 720 260","Comparison: animating box-shadow repaints the shadow every frame; fading a pre-painted shadow layer with opacity paints once and composites each frame",[63,926,927],{},"Paint once, composite many times",[67,929,930],{},"Top row: five frames of a box-shadow transition, each marked with a paint icon, meaning the shadow is repainted five times. Bottom row: one paint when the pseudo-element is first drawn, then five frames marked composite only as its opacity changes.",[71,932,933],{"textAnchor":73,"x":74,"y":75,"style":76},"Where the work happens across five frames",[71,935,251],{"textAnchor":145,"x":936,"y":937,"style":938},"120","84","text-anchor:end;fill:currentColor;font:600 12px ui-monospace,monospace",[71,940,942],{"textAnchor":145,"x":936,"y":941,"style":938},"174","::after opacity",[79,944],{"x":83,"y":945,"width":946,"height":947,"rx":117,"fill":87,"opacity":948},"64","90","32","0.2",[79,950],{"x":886,"y":945,"width":946,"height":947,"rx":117,"fill":87,"opacity":948},[79,952],{"x":74,"y":945,"width":946,"height":947,"rx":117,"fill":87,"opacity":948},[79,954],{"x":955,"y":945,"width":946,"height":947,"rx":117,"fill":87,"opacity":948},"470",[79,957],{"x":958,"y":945,"width":946,"height":947,"rx":117,"fill":87,"opacity":948},"580",[71,960,964],{"textAnchor":73,"x":961,"y":962,"style":963},"185","85","text-anchor:middle;fill:currentColor;font:12px sans-serif","paint",[71,966,964],{"textAnchor":73,"x":967,"y":962,"style":963},"295",[71,969,964],{"textAnchor":73,"x":970,"y":962,"style":963},"405",[71,972,964],{"textAnchor":73,"x":973,"y":962,"style":963},"515",[71,975,964],{"textAnchor":73,"x":976,"y":962,"style":963},"625",[79,978],{"x":83,"y":979,"width":946,"height":947,"rx":117,"fill":87,"opacity":948},"154",[79,981],{"x":886,"y":979,"width":946,"height":947,"rx":117,"fill":123,"opacity":982},"0.4",[79,984],{"x":74,"y":979,"width":946,"height":947,"rx":117,"fill":123,"opacity":982},[79,986],{"x":955,"y":979,"width":946,"height":947,"rx":117,"fill":123,"opacity":982},[79,988],{"x":958,"y":979,"width":946,"height":947,"rx":117,"fill":123,"opacity":982},[71,990,992],{"textAnchor":73,"x":961,"y":991,"style":963},"175","paint once",[71,994,995],{"textAnchor":73,"x":967,"y":991,"style":963},"composite",[71,997,995],{"textAnchor":73,"x":970,"y":991,"style":963},[71,999,995],{"textAnchor":73,"x":973,"y":991,"style":963},[71,1001,995],{"textAnchor":73,"x":976,"y":991,"style":963},[71,1003,1005],{"textAnchor":73,"x":970,"y":1004,"style":963},"228","frame 1 to frame 5",[29,1007,1009],{"id":1008},"style-recalculation-counts-too","Style recalculation counts too",[14,1011,1012,1013,1017,1018,1021,1022,1025],{},"The pipeline diagram starts at style, and style work is easy to overlook. Every animation frame that changes a property must recompute styles for the affected element; animating an ",[1014,1015,1016],"em",{},"inherited"," value multiplies that. An animated registered custom property on ",[161,1019,1020],{},":root"," — a popular way to drive a site-wide hue shift — forces style recalculation for every element that inherits it, which on a large page is thousands of elements per frame, before layout or paint are even considered. Animate custom properties on the smallest element that needs them, and register them with ",[161,1023,1024],{},"inherits: false"," when descendants do not need the value.",[14,1027,1028,1029,1032],{},"The same logic applies to class toggles. Adding a class to ",[161,1030,1031],{},"body"," to start a transition makes the browser re-match selectors across the document; adding it to the component that animates keeps the recalculation local. Chromium's Performance panel shows this cost as purple \"Recalculate Style\" blocks, with the number of affected elements listed in the summary.",[29,1034,1036],{"id":1035},"when-layout-animation-is-still-right","When layout animation is still right",[14,1038,1039,1040,1043,1044,1048,1049,1052,1053,1057],{},"Composite-only animation is a strong default, not a rule. Some effects genuinely need layout to change: an accordion whose content pushes the rest of the page down, a list whose items reflow as one is removed. Scaling a panel does not move its siblings, so a scaled accordion leaves a gap or overlaps what follows. In those cases, animate layout but keep it contained: animate a single element whose size change affects as little of the page as possible, keep durations short, and use ",[161,1041,1042],{},"contain"," to limit how far the layout work spreads, as described in ",[18,1045,1047],{"href":1046},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcontain-property-for-animation-performance\u002F","The contain Property for Animation Performance",". Newer tools such as ",[161,1050,1051],{},"interpolate-size"," make height-auto animation easier to write, but they still run layout every frame; ",[18,1054,1056],{"href":1055},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Finterpolate-size-for-height-auto-animation\u002F","Animating to height: auto With interpolate-size"," discusses that trade-off. View transitions offer another route, animating snapshots of a layout change on the compositor.",[29,1059,1061],{"id":1060},"verifying-with-devtools","Verifying with DevTools",[14,1063,1064,1065,1069],{},"Categorising properties by memory is a starting point; measurement is the proof. In Chromium's Performance panel, record while the animation runs. Purple \"Layout\" and green \"Paint\" blocks on every frame mean the animation is not composite-only. The Rendering panel's \"Paint flashing\" option highlights repainted areas in green as they happen — a hover effect that flashes the whole card green on every frame is repainting it. ",[18,1066,1068],{"href":1067},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fprofiling-animations-in-devtools\u002F","Profiling Animations in DevTools"," walks through both tools.",[29,1071,1073],{"id":1072},"browser-support","Browser support",[14,1075,1076,1078,1079,164,1081,171,1083,1085,1086,1088],{},[161,1077,274],{}," is supported in Chrome 36+, Edge 12+, Firefox 16+ and Safari 9+; the standalone ",[161,1080,278],{},[161,1082,281],{},[161,1084,284],{}," properties in Chrome and Edge 104+, Firefox 72+ and Safari 14.1+. ",[161,1087,288],{}," transitions work everywhere. Which properties the compositor can handle directly varies by engine and version, which is why transform and opacity remain the dependable pair across all of them.",[29,1090,1092],{"id":1091},"faq","FAQ",[14,1094,1095,1098,1100,1101,164,1103,171,1105,1107,1108,1110],{},[37,1096,1097],{},"Which CSS properties are cheapest to animate?",[161,1099,274],{}," and its standalone forms ",[161,1102,278],{},[161,1104,281],{},[161,1106,284],{},", plus ",[161,1109,288],{},". Browsers can animate them on the compositor without recalculating layout or repainting the element, so they stay smooth even when the main thread is busy.",[14,1112,1113,1116],{},[37,1114,1115],{},"Why is animating width or height slow?","\nChanging a box's size changes layout: the element and potentially its siblings, parent and descendants must be measured and positioned again, then repainted, on every frame. On complex pages that work easily exceeds the frame budget.",[14,1118,1119,1122,1123,1125],{},[37,1120,1121],{},"Is animating background-color expensive?","\nIt skips layout but repaints the element on every frame. For a small button that is cheap; for a large area it can be costly. Crossfading an overlay with ",[161,1124,288],{}," is often cheaper for large surfaces.",[14,1127,1128,1131],{},[37,1129,1130],{},"Do filters and clip-path run on the compositor?","\nIncreasingly, yes, in some browsers and in some conditions, but not consistently across engines. Treat them as paint-level properties unless profiling on your target browsers shows otherwise.",[29,1133,1135],{"id":1134},"related","Related",[1137,1138,1139,1145,1152,1159],"ul",{},[1140,1141,1142,1144],"li",{},[18,1143,21],{"href":20}," — the parent guide.",[1140,1146,1147,1151],{},[18,1148,1150],{"href":1149},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Foptimizing-css-animations-for-60fps\u002F","Optimizing CSS Animations for 60fps"," — frame budgets in practice.",[1140,1153,1154,1158],{},[18,1155,1157],{"href":1156},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fwill-change-and-the-compositor-thread\u002F","will-change and the Compositor Thread"," — promoting layers deliberately.",[1140,1160,1161,1165],{},[18,1162,1164],{"href":1163},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fanimating-box-shadow-and-filters-cheaply\u002F","Animating box-shadow and Filters Cheaply"," — more paint-to-composite swaps.",[1167,1168,1169],"style",{},"html pre.shiki code .sLBg1, html code.shiki .sLBg1{--shiki-default:#66707B;--shiki-dark:#BDC4CC}html pre.shiki code .s-5SL, html code.shiki .s-5SL{--shiki-default:#023B95;--shiki-dark:#91CBFF}html pre.shiki code .suds8, html code.shiki .suds8{--shiki-default:#0E1116;--shiki-dark:#F0F3F6}html pre.shiki code .sHUrx, html code.shiki .sHUrx{--shiki-default:#A0111F;--shiki-dark:#FF9492}html pre.shiki code .sT6z2, html code.shiki .sT6z2{--shiki-default:#032563;--shiki-dark:#ADDCFF}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":313,"searchDepth":327,"depth":327,"links":1171},[1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183],{"id":31,"depth":327,"text":32},{"id":155,"depth":327,"text":156},{"id":226,"depth":327,"text":227},{"id":268,"depth":327,"text":269},{"id":292,"depth":327,"text":293},{"id":916,"depth":327,"text":917},{"id":1008,"depth":327,"text":1009},{"id":1035,"depth":327,"text":1036},{"id":1060,"depth":327,"text":1061},{"id":1072,"depth":327,"text":1073},{"id":1091,"depth":327,"text":1092},{"id":1134,"depth":327,"text":1135},"Which CSS properties force layout, which only repaint, and which can animate on the compositor alone, with cheaper composite-only swaps for the expensive ones.","md",{"pageTitle":5,"datePublished":1187,"dateModified":1187,"faq":1188},"2026-09-18",[1189,1191,1193,1195],{"q":1097,"a":1190},"transform and its standalone forms translate, rotate and scale, plus opacity. Browsers can animate them on the compositor without recalculating layout or repainting the element, so they stay smooth even when the main thread is busy.",{"q":1115,"a":1192},"Changing a box's size changes layout: the element and potentially its siblings, parent and descendants must be measured and positioned again, then repainted, on every frame. On complex pages that work easily exceeds the frame budget.",{"q":1121,"a":1194},"It skips layout but repaints the element on every frame. For a small button that is cheap; for a large area it can be costly. Crossfading an overlay with opacity is often cheaper for large surfaces.",{"q":1130,"a":1196},"Increasingly, yes, in some browsers and in some conditions, but not consistently across engines. Treat them as paint-level properties unless profiling on your target browsers shows otherwise.","\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcss-triggers-layout-paint-composite",{"title":5,"description":1184},"css-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcss-triggers-layout-paint-composite\u002Findex","cvZBkO2pf8AJTJSkhOMbMX1HeVwl6ldV1J0isV5prFA",[1202,1205,1208,1211,1214,1217,1220,1223,1226,1229,1232,1235,1238,1241,1244,1247,1250,1253,1256,1259,1262,1265,1268,1271,1274,1277,1280,1283,1286,1289,1292,1295,1298,1301,1304,1307,1310,1313,1316,1319,1322,1325,1328,1331,1334,1337,1340,1343,1346,1349,1352,1355,1358,1361,1364,1367,1370,1373,1376,1379,1382,1385,1388,1391,1394,1397,1400,1403,1406,1409,1412,1415,1418,1420,1422,1423,1426,1429,1432,1435,1438,1441,1444,1447,1450,1453,1456,1459,1462,1465,1468,1471,1474,1477,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,1614,1617,1620,1623,1626,1629,1632,1635,1638,1641,1644,1647,1650,1653,1656,1659,1662,1665,1668,1671,1674,1677,1680,1683,1686,1689,1692,1695,1698,1701,1704,1707,1710,1713,1716,1719,1722,1725,1728,1731,1734,1737,1740,1743,1746,1749,1752,1755],{"path":1203,"title":1204},"\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":1206,"title":1207},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fflashing-content-and-seizure-thresholds","Flashing Content and Seizure Thresholds",{"path":1209,"title":1210},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fforced-colors-mode-and-animations","Forced Colors Mode and Animations",{"path":1212,"title":1213},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations","Accessibility in CSS Animations: Patterns, Specs & Best Practices",{"path":1215,"title":1216},"\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":1218,"title":1219},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fprefers-reduced-motion-recipes","prefers-reduced-motion Recipes: A Reduction for Every Common Effect",{"path":1221,"title":1222},"\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":1224,"title":1225},"\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":1227,"title":1228},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fvestibular-safe-animation-patterns","Vestibular-Safe Animation Patterns: Why Some Motion Makes People Sick",{"path":1230,"title":1231},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fwcag-motion-success-criteria","WCAG Motion Success Criteria: What Each One Actually Requires",{"path":1233,"title":1234},"\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":1236,"title":1237},"\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":1239,"title":1240},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations","Clip-Path & Mask Animations: Animating Visibility Instead of Position",{"path":1242,"title":1243},"\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":1245,"title":1246},"\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":1248,"title":1249},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fanimating-gradients","Animating CSS Gradients: Smooth Colour Motion Without Jumps",{"path":1251,"title":1252},"\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":1254,"title":1255},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions","Color & Theme Transitions: Colour as Part of the Motion System",{"path":1257,"title":1258},"\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":1260,"title":1261},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fsmooth-theme-switching-transitions","Smooth Theme Switching: Crossfades, Circular Reveals and No Flash",{"path":1263,"title":1264},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fcontainer-query-hover-affordances","Container Query Hover Affordances: When Narrow Means Persistent, Not Hidden",{"path":1266,"title":1267},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion","Container-Aware Motion: Animation Sized by the Space a Component Actually Has",{"path":1269,"title":1270},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Flayout-change-animations-at-container-breakpoints","Animating Changes at Container Breakpoints",{"path":1272,"title":1273},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fmotion-driven-by-container-style-queries","Motion Driven by Container Style Queries",{"path":1275,"title":1276},"\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":1278,"title":1279},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fsuppressing-motion-in-small-containers","Suppressing Motion in Small Containers: Deliberately Animating Nothing",{"path":1281,"title":1282},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fcontrolling-css-animations-from-javascript","Controlling CSS Animations From JavaScript",{"path":1284,"title":1285},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api","CSS Animation vs the Web Animations API: A Decision Guide",{"path":1287,"title":1288},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fwaapi-vs-css-for-interruptible-ui","Interruptible UI: CSS Transitions vs WAAPI",{"path":1290,"title":1291},"\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":1293,"title":1294},"\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":1296,"title":1297},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fcustom-property-fallbacks-and-invalid-values","Custom Property Fallbacks and Invalid Values",{"path":1299,"title":1300},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Ffluid-spacing-tokens-driving-transition-durations","Fluid Spacing Tokens That Drive Transition Durations",{"path":1302,"title":1303},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture","CSS Custom Properties Architecture: Scalable Design Systems & Dynamic UI",{"path":1305,"title":1306},"\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":1308,"title":1309},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fscoping-custom-properties-to-components","Scoping Custom Properties to Components",{"path":1311,"title":1312},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fcss-transition-timing-functions","CSS Transition Timing Functions: ease, cubic-bezier(), steps() and linear()",{"path":1314,"title":1315},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals","CSS Transition Fundamentals: Architecture, Performance & Patterns",{"path":1317,"title":1318},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Finterrupted-and-reversing-transitions","Interrupted and Reversing Transitions: What Happens Mid-Flight",{"path":1320,"title":1321},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fstarting-style-entry-animations","@starting-style: Animating an Element's Very First Style Change",{"path":1323,"title":1324},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-delay-choreography","Choreographing Motion With transition-delay",{"path":1326,"title":1327},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-shorthand-and-multiple-properties","The transition Shorthand and Multiple Properties",{"path":1329,"title":1330},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransitioning-display-with-allow-discrete","Transitioning display with transition-behavior: allow-discrete and @starting-style",{"path":1332,"title":1333},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fanimating-dialog-open-and-close","Animating \u003Cdialog> Open and Close: Both Directions, No Library",{"path":1335,"title":1336},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fbackdrop-animations","Animating ::backdrop: Fades and Blurs Behind Dialogs and Popovers",{"path":1338,"title":1339},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations","Dialog & Popover Animations: Motion for the Top Layer",{"path":1341,"title":1342},"\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":1344,"title":1345},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fpopover-entry-and-exit-transitions","Popover Menus That Animate From Their Anchor",{"path":1347,"title":1348},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fchoosing-animation-durations","Choosing Animation Durations: How Long Motion Should Last",{"path":1350,"title":1351},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fcubic-bezier-overshoot-and-anticipation","Overshoot and Anticipation With cubic-bezier(): Motion With Character",{"path":1353,"title":1354},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fentry-vs-exit-easing","Entry vs Exit Easing: Different Curves for Arriving and Leaving",{"path":1356,"title":1357},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design","Easing & Motion Design: Making CSS Motion Feel Intentional",{"path":1359,"title":1360},"\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":1362,"title":1363},"\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":1365,"title":1366},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Faccessible-css-only-tooltips","Accessible CSS-Only Tooltips and Hover Cards With  and ",{"path":1368,"title":1369},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fbutton-press-and-active-states","Button Press and  States",{"path":1371,"title":1372},"\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":1374,"title":1375},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Ffocus-within-form-patterns"," Form Patterns: Styling a Group From the Field Inside It",{"path":1377,"title":1378},"\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":1380,"title":1381},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design","Hover & Focus State Design: Spec-Compliant Patterns for Modern UIs",{"path":1383,"title":1384},"\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":1386,"title":1387},"\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":1389,"title":1390},"\u002Fcss-only-micro-interactions-animations","CSS-Only Micro-Interactions & Animations: Architecture, Performance & Implementation",{"path":1392,"title":1393},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fanimation-composition-and-stacking","Stacking Animations With animation-composition",{"path":1395,"title":1396},"\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":1398,"title":1399},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcontainer-query-triggered-keyframe-animations","Container-Query-Triggered Keyframe Animations: Animate Differently per Available Space",{"path":1401,"title":1402},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-accordions-and-disclosure","CSS-Only Accordions and Disclosure Widgets with details and summary",{"path":1404,"title":1405},"\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":1407,"title":1408},"\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":1410,"title":1411},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns","Keyframe Animation Patterns: Spec-Compliant Architectures for Modern UIs",{"path":1413,"title":1414},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fmulti-step-keyframes-and-per-keyframe-easing","Multi-Step Keyframes and Per-Keyframe Easing",{"path":1416,"title":1417},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fstaggered-list-animations-with-custom-properties","Staggered List Animations Using --i Index Custom Properties",{"path":1419,"title":1164},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fanimating-box-shadow-and-filters-cheaply",{"path":1421,"title":1047},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcontain-property-for-animation-performance",{"path":1197,"title":5},{"path":1424,"title":1425},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration","Performance & GPU Acceleration in CSS: A Developer’s Blueprint",{"path":1427,"title":1428},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Foptimizing-css-animations-for-60fps","Optimizing CSS Animations for 60fps: Budgeting the Frame",{"path":1430,"title":1431},"\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":1433,"title":1434},"\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":1436,"title":1437},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations","Scroll-Driven Animations: Binding Motion to Scroll Position in Pure CSS",{"path":1439,"title":1440},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-animation-fallbacks","Shipping Scroll-Driven Animations Without Breaking Anything",{"path":1442,"title":1443},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-parallax-effects","Scroll-Driven Parallax Effects in CSS",{"path":1445,"title":1446},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-progress-bar-without-javascript","A Reading Progress Bar Driven by scroll(root)",{"path":1448,"title":1449},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-triggered-reveal-animations","Reveal-on-Scroll with view() and animation-range",{"path":1451,"title":1452},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Ftimeline-scope-for-cross-element-animations","timeline-scope for Cross-Element Animations",{"path":1454,"title":1455},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fview-timeline-and-animation-range","View Timelines and animation-range",{"path":1457,"title":1458},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fcross-document-view-transitions","Cross-Document View Transitions",{"path":1460,"title":1461},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers","View Transitions for CSS Developers: the Pseudo-Element Tree, Snapshots, and Named Elements",{"path":1463,"title":1464},"\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":1466,"title":1467},"\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":1469,"title":1470},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transition-types-and-classes","View Transition Types and Classes",{"path":1472,"title":1473},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-for-list-reordering","View Transitions for List Reordering",{"path":1475,"title":1476},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-with-reduced-motion","Honouring prefers-reduced-motion in View Transitions",{"path":188,"title":1478},"Modern CSS Layouts & Micro-Interactions",{"path":1480,"title":1481},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioned-tooltips","Anchor-Positioned Tooltips: Tethering, Flipping, and Getting the Semantics Right",{"path":1483,"title":1484},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioning-fallbacks","Anchor Positioning Fallbacks: A Graceful Floor for Older Browser Versions",{"path":1486,"title":1487},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-size-for-matching-widths","anchor-size(): Overlays That Match Their Trigger's Size",{"path":1489,"title":1490},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays","CSS Anchor Positioning and Overlays: Tethering Elements Without JavaScript",{"path":1492,"title":1493},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-attribute-and-css-styling","The popover Attribute: Top-Layer Overlays With No JavaScript",{"path":1495,"title":1496},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-light-dismiss-and-stacking","Popover Light Dismiss, Nesting and Stacking",{"path":1498,"title":1499},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fposition-area-grid-explained","position-area: The Anchor Placement Grid",{"path":1501,"title":1502},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fcontainer-query-polyfill-tradeoffs","Container Query Polyfills: What They Cost and When to Skip Them",{"path":1504,"title":1505},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ffeature-detection-with-supports","Feature Detection with @supports: Syntax, Semantics, and the Traps",{"path":1507,"title":1508},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fhandling-container-query-fallbacks-for-older-browsers","Handling Container Query Fallbacks for Older Browsers",{"path":1510,"title":1511},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks","Container Query Fallbacks: Spec-Compliant CSS Strategies for Legacy Browsers",{"path":1513,"title":1514},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fintrinsic-layout-fallbacks-without-queries","Intrinsic Layout Fallbacks: Baselines That Adapt Without Any Query",{"path":1516,"title":1517},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ftesting-fallbacks-without-old-browsers","Testing CSS Fallbacks Without an Old Browser",{"path":1519,"title":1520},"\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":1522,"title":1523},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-query-range-and-logic-operators","Container Query Range Syntax and Logic Operators",{"path":1525,"title":1526},"\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":1528,"title":1529},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-type-size-vs-inline-size","Choosing container-type: inline-size, size, or normal",{"path":1531,"title":1532},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-vs-media-queries-comparison","Container vs Media Queries: Choosing the Right Reference Box",{"path":1534,"title":1535},"\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":1537,"title":1538},"\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":1540,"title":1541},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics","Container Query Syntax Basics",{"path":1543,"title":1544},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fnesting-and-naming-container-queries","Nesting and Naming Container Queries: Targeting the Right Ancestor",{"path":1546,"title":1547},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fauto-fit-minmax-responsive-grids","Responsive Grids with repeat(auto-fit, minmax())",{"path":1549,"title":1550},"\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":1552,"title":1553},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fgrid-auto-flow-dense-packing","grid-auto-flow: dense for Packed Layouts",{"path":1555,"title":1556},"\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":1558,"title":1559},"\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":1561,"title":1562},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts","CSS Grid and Subgrid Layouts for Responsive Interfaces",{"path":1564,"title":1565},"\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":1567,"title":1568},"\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":1570,"title":1571},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fsubgrid-vs-nested-grid","Subgrid vs an Independently Nested Grid",{"path":1573,"title":1574},"\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":1576,"title":1577},"\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":1579,"title":1580},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-grow-and-flex-shrink-explained","flex-grow and flex-shrink Explained",{"path":1582,"title":1583},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-wrap-intrinsic-responsive-rows","Breakpoint-Free Responsive Rows With flex-wrap and flex-basis",{"path":1585,"title":1586},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflexbox-gap-and-spacing","Flexbox gap vs Margins: Spacing Items Without Edge Hacks",{"path":1588,"title":1589},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns","Flexbox Layout Patterns: One-Dimensional Layout for Real Components",{"path":1591,"title":1592},"\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":1594,"title":1595},"\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":1597,"title":1598},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fdebugging-clamp-values","Debugging clamp(): Values That Are Ignored, Stuck or Never Fluid",{"path":1600,"title":1601},"\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":1603,"title":1604},"\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":1606,"title":1607},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-type-accessibility-and-zoom","Fluid Type, Accessibility and Zoom: The vw-Only Trap",{"path":1609,"title":1610},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-typography-without-javascript","Fluid Typography Without JavaScript: A Precision CSS Reference",{"path":1612,"title":1613},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp","Fluid Typography with clamp(): A Practical Guide for Modern CSS",{"path":1615,"title":1616},"\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":1618,"title":1619},"\u002Fmastering-container-queries-responsive-layouts","Mastering Container Queries & Responsive Layouts",{"path":1621,"title":1622},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Faspect-ratio-for-responsive-media","Using aspect-ratio for Responsive Media and Preventing Layout Shift",{"path":1624,"title":1625},"\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":1627,"title":1628},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques","Intrinsic Sizing Techniques: Modern CSS Layouts for Responsive UI",{"path":1630,"title":1631},"\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":1633,"title":1634},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fmin-max-fit-content-explained","min-content, max-content, and fit-content() Explained",{"path":1636,"title":1637},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fobject-fit-and-object-position","object-fit and object-position: Images That Fit Any Box",{"path":1639,"title":1640},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fpreventing-flex-and-grid-overflow","The min-width: auto Trap in Flex and Grid Layouts",{"path":1642,"title":1643},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-for-reset-and-tokens","Cascade Layers for Reset and Design Tokens",{"path":1645,"title":1646},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-vs-specificity-hacks","Cascade Layers vs Specificity Hacks: Ordering Instead of Escalating",{"path":1648,"title":1649},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcss-scope-for-component-styles","@scope for Component Styles: Short Selectors That Cannot Leak",{"path":1651,"title":1652},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies","Modern CSS Reset Strategies: A Spec-Compliant Foundation",{"path":1654,"title":1655},"\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":1657,"title":1658},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fwriting-a-minimal-modern-reset","Writing a Minimal Modern CSS Reset: Every Line Justified",{"path":1660,"title":1661},"\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":1663,"title":1664},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fempty-and-loading-states-with-has","Empty and Loading States With ()",{"path":1666,"title":1667},"\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":1669,"title":1670},"\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":1672,"title":1673},"\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":1675,"title":1676},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has","Parent-Aware Layouts With :has(): Letting Containers React to Their Contents",{"path":1678,"title":1679},"\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":1681,"title":1682},"\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":1684,"title":1685},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-data-tables","Container Query Data Tables: Reflowing Tables to Cards",{"path":1687,"title":1688},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-sidebar-layouts","Container Query Sidebar Layouts That Travel Between Contexts",{"path":1690,"title":1691},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns","Responsive Component Patterns: Architecture & Implementation",{"path":1693,"title":1694},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-forms-with-container-queries","Responsive Forms with Container Queries: Reflow Without Losing the Wiring",{"path":1696,"title":1697},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-hero-sections-with-container-queries","Responsive Hero Sections With Container Queries",{"path":1699,"title":1700},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-navigation-without-media-queries","Responsive Navigation Without Media Queries Using Container Queries",{"path":1702,"title":1703},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-pricing-tables","Responsive Pricing Tables: Aligned Features, a Clear Recommendation, Any Width",{"path":1705,"title":1706},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Ftabs-that-become-accordions","Tabs That Become an Accordion: One Component, Two Layouts",{"path":1708,"title":1709},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fcss-only-carousel-with-scroll-snap","A CSS-Only Carousel With Scroll Snap",{"path":1711,"title":1712},"\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":1714,"title":1715},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts","Scroll Snap & Overflow Layouts: Designing Components That Scroll on Purpose",{"path":1717,"title":1718},"\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":1720,"title":1721},"\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":1723,"title":1724},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fcombining-size-and-style-queries","Combining Size and Style Container Queries",{"path":1726,"title":1727},"\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":1729,"title":1730},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state","Style Queries and Container State: Token-Driven Component Variants",{"path":1732,"title":1733},"\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":1735,"title":1736},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fstyle-query-component-variants","Component Variants With Style Queries: One Token, Many Looks",{"path":1738,"title":1739},"\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":1741,"title":1742},"\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":1744,"title":1745},"\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":1747,"title":1748},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout","Viewport Units & Mobile Layout: Designing for the Screen You Actually Get",{"path":1750,"title":1751},"\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":1753,"title":1754},"\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":1756,"title":1757},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Fvirtual-keyboard-and-interactive-widget","Layouts That Survive the Virtual Keyboard",{"title":1759,"caption":1760,"height":1761,"html":1762,"css":1763},"The same effects, two pipelines","Hover each card. The left card animates box-shadow (repaint every frame); the right fades a pre-painted shadow with opacity (composite only). They look alike — turn on Paint flashing in DevTools to see the difference.",220,"\n\u003Cdiv class=\"grid\">\n  \u003Cdiv class=\"card card-slow\">\u003Cstrong>box-shadow\u003C\u002Fstrong>\u003Cspan>repaints each frame\u003C\u002Fspan>\u003C\u002Fdiv>\n  \u003Cdiv class=\"card card-fast\">\u003Cstrong>::after opacity\u003C\u002Fstrong>\u003Cspan>paints once\u003C\u002Fspan>\u003C\u002Fdiv>\n\u003C\u002Fdiv>","\n.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1.5rem; padding: 1.5rem; }\n.card { display: grid; gap: 0.25rem; padding: 1.25rem; border-radius: 12px; background: var(--demo-surface); border: 1px solid var(--demo-border); }\n.card span { color: var(--demo-muted); font-size: 0.85rem; }\n.card-slow { transition: box-shadow 200ms ease-out; }\n.card-slow:hover { box-shadow: 0 12px 32px rgb(0 0 0 \u002F 0.25); }\n.card-fast { position: relative; }\n.card-fast::after { content: \"\"; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 12px 32px rgb(0 0 0 \u002F 0.25); opacity: 0; transition: opacity 200ms ease-out; pointer-events: none; }\n.card-fast:hover::after { opacity: 1; }",1789717748255]