[{"data":1,"prerenderedAt":2524},["ShallowReactive",2],{"page-\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fanimating-gradients":3,"content-all-pages":1959,"live-demo:gradient-animations":2518},{"id":4,"title":5,"body":6,"description":1941,"extension":1942,"meta":1943,"navigation":392,"path":1955,"seo":1956,"stem":1957,"__hash__":1958},"content\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fanimating-gradients\u002Findex.md","Animating CSS Gradients: Smooth Colour Motion Without Jumps",{"type":7,"value":8,"toc":1931},"minimark",[9,13,42,47,53,56,163,167,174,178,1402,1412,1416,1419,1492,1502,1513,1517,1528,1543,1554,1560,1564,1571,1805,1811,1815,1840,1844,1856,1869,1885,1894,1898,1928],[10,11,5],"h1",{"id":12},"animating-css-gradients-smooth-colour-motion-without-jumps",[14,15,16,17,21,22,25,26,30,31,36,37,41],"p",{},"A gradient that shifts hue on hover, a button whose sheen sweeps across it, a hero whose colours slowly drift — gradients are among the most requested animations and among the most commonly broken. Writing ",[18,19,20],"code",{},"transition: background 0.5s"," between two gradients does nothing useful: the background snaps from one to the other at the end of the half-second. The reason is that ",[18,23,24],{},"background-image"," is not interpolable, and a gradient is an image. The narrow problem this page solves is animating gradients anyway, by animating the things that ",[27,28,29],"em",{},"are"," interpolable: registered colour and position properties, the background's position and size, and hue angles in a perceptual colour space. It belongs to ",[32,33,35],"a",{"href":34},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002F","Color & Theme Transitions"," in the ",[32,38,40],{"href":39},"\u002Fcss-only-micro-interactions-animations\u002F","CSS-Only Micro-Interactions & Animations"," guide.",[43,44,46],"h2",{"id":45},"why-gradients-refuse-to-transition","Why gradients refuse to transition",[14,48,49,50,52],{},"Interpolation needs a numeric path from the start value to the end value. Two colours have one: each channel moves linearly. Two lengths have one. Two gradient images do not in general — they may have different numbers of stops, different types (linear, radial, conic), different directions — so the specification treats ",[18,51,24],{}," as a discrete property: the value flips at the end of a transition or halfway through an animation.",[14,54,55],{},"The way out is decomposition. A gradient is built from values that are interpolable on their own: colours, stop positions, an angle. If those values live in custom properties, and the custom properties are registered with a type, the browser can interpolate the properties and rebuild the gradient from them each frame. The image never interpolates; its inputs do.",[57,58,64,65,64,69,64,73,64,81,64,91,64,97,64,100,64,104,64,107,64,111,64,121,64,124,64,128,64,135,64,140,64,144,64,148,64,153,64,158],"svg",{"viewBox":59,"role":60,"ariaLabel":61,"xmlns":62,"style":63},"0 0 720 300","img","A gradient decomposed into registered custom properties for two colours and an angle, which interpolate and feed the gradient each frame","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","width:100%;height:auto;max-width:720px;margin:2rem 0","\n  ",[66,67,68],"title",{},"Animate the inputs, rebuild the image",[70,71,72],"desc",{},"Three registered custom properties, --from as a color, --to as a color and --angle as an angle, each interpolate smoothly. Every frame the browser substitutes their current values into linear-gradient and repaints the background.",[74,75,80],"text",{"textAnchor":76,"x":77,"y":78,"style":79},"middle","360","26","text-anchor:middle;fill:currentColor;font:700 17px sans-serif","The gradient is rebuilt from typed inputs each frame",[82,83],"rect",{"x":84,"y":85,"width":86,"height":87,"rx":88,"fill":89,"opacity":90},"30","56","180","46","8","#7aa2ff","0.28",[74,92,96],{"textAnchor":76,"x":93,"y":94,"style":95},"120","84","text-anchor:middle;fill:currentColor;font:12px ui-monospace,monospace","--from: \u003Ccolor>",[82,98],{"x":84,"y":99,"width":86,"height":87,"rx":88,"fill":89,"opacity":90},"116",[74,101,103],{"textAnchor":76,"x":93,"y":102,"style":95},"144","--to: \u003Ccolor>",[82,105],{"x":84,"y":106,"width":86,"height":87,"rx":88,"fill":89,"opacity":90},"176",[74,108,110],{"textAnchor":76,"x":93,"y":109,"style":95},"204","--angle: \u003Cangle>",[112,113],"line",{"x1":114,"y1":115,"x2":116,"y2":117,"stroke":118,"strokeWidth":119,"opacity":120},"210","79","300","130","currentColor","1.5","0.6",[112,122],{"x1":114,"y1":123,"x2":116,"y2":123,"stroke":118,"strokeWidth":119,"opacity":120},"139",[112,125],{"x1":114,"y1":126,"x2":116,"y2":127,"stroke":118,"strokeWidth":119,"opacity":120},"199","148",[82,129],{"x":116,"y":130,"width":131,"height":132,"rx":133,"fill":134,"stroke":118,"strokeWidth":119,"opacity":120},"110","220","58","10","none",[74,136,139],{"textAnchor":76,"x":137,"y":138,"style":95},"410","134","linear-gradient(",[74,141,143],{"textAnchor":76,"x":137,"y":142,"style":95},"154","var(--angle), …)",[112,145],{"x1":146,"y1":123,"x2":147,"y2":123,"stroke":118,"strokeWidth":119,"opacity":120},"520","560",[82,149],{"x":147,"y":150,"width":117,"height":151,"rx":133,"fill":89,"opacity":152},"100","78","0.5",[74,154,157],{"textAnchor":76,"x":155,"y":102,"style":156},"625","text-anchor:middle;fill:currentColor;font:12px sans-serif","repaint",[74,159,162],{"textAnchor":76,"x":77,"y":160,"style":161},"266","text-anchor:middle;fill:currentColor;font:12px sans-serif;opacity:0.8","Registration is essential: an unregistered property is untyped text and cannot interpolate.",[43,164,166],{"id":165},"the-complete-implementation","The complete implementation",[14,168,169,170,173],{},"The page shows three techniques side by side: a hover that shifts both gradient colours through registered properties, a sheen that sweeps across a button by moving an oversized background, and a slowly rotating hue using ",[18,171,172],{},"oklch",".",[175,176],"live-demo",{"name":177},"gradient-animations",[179,180,185],"pre",{"className":181,"code":182,"language":183,"meta":184,"style":184},"language-html shiki shiki-themes github-light-high-contrast github-dark-high-contrast","\u003C!doctype html>\n\u003Chtml lang=\"en\">\n\u003Chead>\n\u003Cmeta charset=\"utf-8\">\n\u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\u003Ctitle>Animating gradients\u003C\u002Ftitle>\n\u003Cstyle>\n  body { font: 16px\u002F1.5 system-ui, sans-serif; margin: 1.5rem; display: grid; gap: 1.25rem; justify-items: start; }\n\n  \u002F* 1. Colour shift on hover via registered colour properties. *\u002F\n  @property --from { syntax: \"\u003Ccolor>\"; inherits: false; initial-value: #6366f1; }\n  @property --to   { syntax: \"\u003Ccolor>\"; inherits: false; initial-value: #22d3ee; }\n\n  .tile {\n    width: 16rem;\n    height: 6rem;\n    border-radius: 12px;\n    background: linear-gradient(135deg in oklch, var(--from), var(--to));\n    transition: --from 400ms ease, --to 400ms ease;\n  }\n  .tile:hover,\n  .tile:focus-visible {\n    --from: #ec4899;\n    --to: #f59e0b;\n  }\n  .tile:focus-visible { outline: 2px solid #0f172a; outline-offset: 3px; }\n\n  \u002F* 2. Sheen sweep: a gradient twice as wide as the button, moved across it.\n     Only background-position animates, so the gradient is not rebuilt. *\u002F\n  .sheen {\n    padding: 0.7rem 1.4rem;\n    border: 0;\n    border-radius: 8px;\n    color: #ffffff;\n    font: inherit;\n    background:\n      linear-gradient(110deg, transparent 35%, rgb(255 255 255 \u002F 0.35) 50%, transparent 65%)\n        0 0 \u002F 250% 100% no-repeat,\n      #1d4ed8;\n    background-position: 100% 0, 0 0;\n    transition: background-position 700ms ease;\n  }\n  .sheen:hover,\n  .sheen:focus-visible {\n    background-position: 0% 0, 0 0;\n  }\n  .sheen:focus-visible { outline: 2px solid #0f172a; outline-offset: 3px; }\n\n  \u002F* 3. Slow hue rotation: one registered angle drives both stops. *\u002F\n  @property --hue { syntax: \"\u003Cangle>\"; inherits: false; initial-value: 250deg; }\n\n  .aurora {\n    width: 16rem;\n    height: 6rem;\n    border-radius: 12px;\n    background: linear-gradient(\n      90deg in oklch,\n      oklch(70% 0.15 var(--hue)),\n      oklch(70% 0.15 calc(var(--hue) + 60deg))\n    );\n    animation: drift 12s linear infinite;\n  }\n  @keyframes drift { to { --hue: 610deg; } }   \u002F* one full turn, 250 → 610 *\u002F\n\n  @media (prefers-reduced-motion: reduce) {\n    .tile, .sheen { transition: none; }\n    .aurora { animation: none; }\n  }\n\u003C\u002Fstyle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cdiv class=\"tile\" tabindex=\"0\" role=\"img\" aria-label=\"Gradient tile\">\u003C\u002Fdiv>\n  \u003Cbutton class=\"sheen\" type=\"button\">Upgrade\u003C\u002Fbutton>\n  \u003Cdiv class=\"aurora\" role=\"img\" aria-label=\"Slowly shifting colour band\">\u003C\u002Fdiv>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n","html","",[18,186,187,206,226,236,254,279,293,303,387,394,401,427,448,453,462,477,492,507,555,584,590,599,607,620,633,638,675,680,686,692,700,720,733,746,759,772,780,844,870,878,900,917,922,930,938,959,964,995,1000,1006,1023,1028,1036,1049,1062,1075,1087,1100,1127,1164,1170,1192,1197,1228,1233,1242,1264,1281,1286,1296,1305,1315,1341,1361,1384,1393],{"__ignoreMap":184},[188,189,191,195,199,203],"span",{"class":112,"line":190},1,[188,192,194],{"class":193},"suds8","\u003C!",[188,196,198],{"class":197},"sne4z","doctype",[188,200,202],{"class":201},"s-5SL"," html",[188,204,205],{"class":193},">\n",[188,207,209,212,214,217,220,224],{"class":112,"line":208},2,[188,210,211],{"class":193},"\u003C",[188,213,183],{"class":197},[188,215,216],{"class":201}," lang",[188,218,219],{"class":193},"=",[188,221,223],{"class":222},"sT6z2","\"en\"",[188,225,205],{"class":193},[188,227,229,231,234],{"class":112,"line":228},3,[188,230,211],{"class":193},[188,232,233],{"class":197},"head",[188,235,205],{"class":193},[188,237,239,241,244,247,249,252],{"class":112,"line":238},4,[188,240,211],{"class":193},[188,242,243],{"class":197},"meta",[188,245,246],{"class":201}," charset",[188,248,219],{"class":193},[188,250,251],{"class":222},"\"utf-8\"",[188,253,205],{"class":193},[188,255,257,259,261,264,266,269,272,274,277],{"class":112,"line":256},5,[188,258,211],{"class":193},[188,260,243],{"class":197},[188,262,263],{"class":201}," name",[188,265,219],{"class":193},[188,267,268],{"class":222},"\"viewport\"",[188,270,271],{"class":201}," content",[188,273,219],{"class":193},[188,275,276],{"class":222},"\"width=device-width, initial-scale=1\"",[188,278,205],{"class":193},[188,280,282,284,286,289,291],{"class":112,"line":281},6,[188,283,211],{"class":193},[188,285,66],{"class":197},[188,287,288],{"class":193},">Animating gradients\u003C\u002F",[188,290,66],{"class":197},[188,292,205],{"class":193},[188,294,296,298,301],{"class":112,"line":295},7,[188,297,211],{"class":193},[188,299,300],{"class":197},"style",[188,302,205],{"class":193},[188,304,306,309,312,315,318,321,325,328,330,333,336,339,342,345,347,349,352,354,357,359,362,364,367,369,372,374,376,379,381,384],{"class":112,"line":305},8,[188,307,308],{"class":197},"  body",[188,310,311],{"class":193}," { ",[188,313,314],{"class":201},"font",[188,316,317],{"class":193},": ",[188,319,320],{"class":201},"16",[188,322,324],{"class":323},"sHUrx","px",[188,326,327],{"class":193},"\u002F",[188,329,119],{"class":201},[188,331,332],{"class":201}," system-ui",[188,334,335],{"class":193},", ",[188,337,338],{"class":201},"sans-serif",[188,340,341],{"class":193},"; ",[188,343,344],{"class":201},"margin",[188,346,317],{"class":193},[188,348,119],{"class":201},[188,350,351],{"class":323},"rem",[188,353,341],{"class":193},[188,355,356],{"class":201},"display",[188,358,317],{"class":193},[188,360,361],{"class":201},"grid",[188,363,341],{"class":193},[188,365,366],{"class":201},"gap",[188,368,317],{"class":193},[188,370,371],{"class":201},"1.25",[188,373,351],{"class":323},[188,375,341],{"class":193},[188,377,378],{"class":201},"justify-items",[188,380,317],{"class":193},[188,382,383],{"class":201},"start",[188,385,386],{"class":193},"; }\n",[188,388,390],{"class":112,"line":389},9,[188,391,393],{"emptyLinePlaceholder":392},true,"\n",[188,395,397],{"class":112,"line":396},10,[188,398,400],{"class":399},"sLBg1","  \u002F* 1. Colour shift on hover via registered colour properties. *\u002F\n",[188,402,404,407,410,413,416,419,421,425],{"class":112,"line":403},11,[188,405,406],{"class":323},"  @property",[188,408,409],{"class":193}," --from { syntax: \"\u003Ccolor",[188,411,412],{"class":323},">",[188,414,415],{"class":193},"\"; inherits: false; ",[188,417,418],{"class":197},"initial-value",[188,420,317],{"class":193},[188,422,424],{"class":423},"sh5d0","#6366f1",[188,426,386],{"class":193},[188,428,430,432,435,437,439,441,443,446],{"class":112,"line":429},12,[188,431,406],{"class":323},[188,433,434],{"class":193}," --to   { syntax: \"\u003Ccolor",[188,436,412],{"class":323},[188,438,415],{"class":193},[188,440,418],{"class":197},[188,442,317],{"class":193},[188,444,445],{"class":423},"#22d3ee",[188,447,386],{"class":193},[188,449,451],{"class":112,"line":450},13,[188,452,393],{"emptyLinePlaceholder":392},[188,454,456,459],{"class":112,"line":455},14,[188,457,458],{"class":201},"  .tile",[188,460,461],{"class":193}," {\n",[188,463,465,468,470,472,474],{"class":112,"line":464},15,[188,466,467],{"class":201},"    width",[188,469,317],{"class":193},[188,471,320],{"class":201},[188,473,351],{"class":323},[188,475,476],{"class":193},";\n",[188,478,480,483,485,488,490],{"class":112,"line":479},16,[188,481,482],{"class":201},"    height",[188,484,317],{"class":193},[188,486,487],{"class":201},"6",[188,489,351],{"class":323},[188,491,476],{"class":193},[188,493,495,498,500,503,505],{"class":112,"line":494},17,[188,496,497],{"class":201},"    border-radius",[188,499,317],{"class":193},[188,501,502],{"class":201},"12",[188,504,324],{"class":323},[188,506,476],{"class":193},[188,508,510,513,515,518,521,524,527,530,533,536,538,542,545,547,549,552],{"class":112,"line":509},18,[188,511,512],{"class":201},"    background",[188,514,317],{"class":193},[188,516,517],{"class":201},"linear-gradient",[188,519,520],{"class":193},"(",[188,522,523],{"class":201},"135",[188,525,526],{"class":323},"deg",[188,528,529],{"class":323}," in",[188,531,532],{"class":193}," oklch, ",[188,534,535],{"class":201},"var",[188,537,520],{"class":193},[188,539,541],{"class":540},"soyes","--from",[188,543,544],{"class":193},"), ",[188,546,535],{"class":201},[188,548,520],{"class":193},[188,550,551],{"class":540},"--to",[188,553,554],{"class":193},"));\n",[188,556,558,561,564,567,570,573,576,578,580,582],{"class":112,"line":557},19,[188,559,560],{"class":201},"    transition",[188,562,563],{"class":193},": --from ",[188,565,566],{"class":201},"400",[188,568,569],{"class":323},"ms",[188,571,572],{"class":201}," ease",[188,574,575],{"class":193},", --to ",[188,577,566],{"class":201},[188,579,569],{"class":323},[188,581,572],{"class":201},[188,583,476],{"class":193},[188,585,587],{"class":112,"line":586},20,[188,588,589],{"class":193},"  }\n",[188,591,593,596],{"class":112,"line":592},21,[188,594,595],{"class":201},"  .tile:hover",[188,597,598],{"class":193},",\n",[188,600,602,605],{"class":112,"line":601},22,[188,603,604],{"class":201},"  .tile:focus-visible",[188,606,461],{"class":193},[188,608,610,613,615,618],{"class":112,"line":609},23,[188,611,612],{"class":540},"    --from",[188,614,317],{"class":193},[188,616,617],{"class":201},"#ec4899",[188,619,476],{"class":193},[188,621,623,626,628,631],{"class":112,"line":622},24,[188,624,625],{"class":540},"    --to",[188,627,317],{"class":193},[188,629,630],{"class":201},"#f59e0b",[188,632,476],{"class":193},[188,634,636],{"class":112,"line":635},25,[188,637,589],{"class":193},[188,639,641,643,645,648,650,653,655,658,661,663,666,668,671,673],{"class":112,"line":640},26,[188,642,604],{"class":201},[188,644,311],{"class":193},[188,646,647],{"class":201},"outline",[188,649,317],{"class":193},[188,651,652],{"class":201},"2",[188,654,324],{"class":323},[188,656,657],{"class":201}," solid",[188,659,660],{"class":201}," #0f172a",[188,662,341],{"class":193},[188,664,665],{"class":201},"outline-offset",[188,667,317],{"class":193},[188,669,670],{"class":201},"3",[188,672,324],{"class":323},[188,674,386],{"class":193},[188,676,678],{"class":112,"line":677},27,[188,679,393],{"emptyLinePlaceholder":392},[188,681,683],{"class":112,"line":682},28,[188,684,685],{"class":399},"  \u002F* 2. Sheen sweep: a gradient twice as wide as the button, moved across it.\n",[188,687,689],{"class":112,"line":688},29,[188,690,691],{"class":399},"     Only background-position animates, so the gradient is not rebuilt. *\u002F\n",[188,693,695,698],{"class":112,"line":694},30,[188,696,697],{"class":201},"  .sheen",[188,699,461],{"class":193},[188,701,703,706,708,711,713,716,718],{"class":112,"line":702},31,[188,704,705],{"class":201},"    padding",[188,707,317],{"class":193},[188,709,710],{"class":201},"0.7",[188,712,351],{"class":323},[188,714,715],{"class":201}," 1.4",[188,717,351],{"class":323},[188,719,476],{"class":193},[188,721,723,726,728,731],{"class":112,"line":722},32,[188,724,725],{"class":201},"    border",[188,727,317],{"class":193},[188,729,730],{"class":201},"0",[188,732,476],{"class":193},[188,734,736,738,740,742,744],{"class":112,"line":735},33,[188,737,497],{"class":201},[188,739,317],{"class":193},[188,741,88],{"class":201},[188,743,324],{"class":323},[188,745,476],{"class":193},[188,747,749,752,754,757],{"class":112,"line":748},34,[188,750,751],{"class":201},"    color",[188,753,317],{"class":193},[188,755,756],{"class":201},"#ffffff",[188,758,476],{"class":193},[188,760,762,765,767,770],{"class":112,"line":761},35,[188,763,764],{"class":201},"    font",[188,766,317],{"class":193},[188,768,769],{"class":201},"inherit",[188,771,476],{"class":193},[188,773,775,777],{"class":112,"line":774},36,[188,776,512],{"class":201},[188,778,779],{"class":193},":\n",[188,781,783,786,788,790,792,794,797,800,803,805,808,810,813,816,818,821,824,827,830,832,834,836,839,841],{"class":112,"line":782},37,[188,784,785],{"class":201},"      linear-gradient",[188,787,520],{"class":193},[188,789,130],{"class":201},[188,791,526],{"class":323},[188,793,335],{"class":193},[188,795,796],{"class":201},"transparent",[188,798,799],{"class":201}," 35",[188,801,802],{"class":323},"%",[188,804,335],{"class":193},[188,806,807],{"class":201},"rgb",[188,809,520],{"class":193},[188,811,812],{"class":201},"255",[188,814,815],{"class":201}," 255",[188,817,815],{"class":201},[188,819,820],{"class":193}," \u002F ",[188,822,823],{"class":201},"0.35",[188,825,826],{"class":193},") ",[188,828,829],{"class":201},"50",[188,831,802],{"class":323},[188,833,335],{"class":193},[188,835,796],{"class":201},[188,837,838],{"class":201}," 65",[188,840,802],{"class":323},[188,842,843],{"class":193},")\n",[188,845,847,850,853,855,858,860,863,865,868],{"class":112,"line":846},38,[188,848,849],{"class":201},"        0",[188,851,852],{"class":201}," 0",[188,854,820],{"class":193},[188,856,857],{"class":201},"250",[188,859,802],{"class":323},[188,861,862],{"class":201}," 100",[188,864,802],{"class":323},[188,866,867],{"class":201}," no-repeat",[188,869,598],{"class":193},[188,871,873,876],{"class":112,"line":872},39,[188,874,875],{"class":201},"      #1d4ed8",[188,877,476],{"class":193},[188,879,881,884,886,888,890,892,894,896,898],{"class":112,"line":880},40,[188,882,883],{"class":201},"    background-position",[188,885,317],{"class":193},[188,887,150],{"class":201},[188,889,802],{"class":323},[188,891,852],{"class":201},[188,893,335],{"class":193},[188,895,730],{"class":201},[188,897,852],{"class":201},[188,899,476],{"class":193},[188,901,903,905,908,911,913,915],{"class":112,"line":902},41,[188,904,560],{"class":201},[188,906,907],{"class":193},": background-position ",[188,909,910],{"class":201},"700",[188,912,569],{"class":323},[188,914,572],{"class":201},[188,916,476],{"class":193},[188,918,920],{"class":112,"line":919},42,[188,921,589],{"class":193},[188,923,925,928],{"class":112,"line":924},43,[188,926,927],{"class":201},"  .sheen:hover",[188,929,598],{"class":193},[188,931,933,936],{"class":112,"line":932},44,[188,934,935],{"class":201},"  .sheen:focus-visible",[188,937,461],{"class":193},[188,939,941,943,945,947,949,951,953,955,957],{"class":112,"line":940},45,[188,942,883],{"class":201},[188,944,317],{"class":193},[188,946,730],{"class":201},[188,948,802],{"class":323},[188,950,852],{"class":201},[188,952,335],{"class":193},[188,954,730],{"class":201},[188,956,852],{"class":201},[188,958,476],{"class":193},[188,960,962],{"class":112,"line":961},46,[188,963,589],{"class":193},[188,965,967,969,971,973,975,977,979,981,983,985,987,989,991,993],{"class":112,"line":966},47,[188,968,935],{"class":201},[188,970,311],{"class":193},[188,972,647],{"class":201},[188,974,317],{"class":193},[188,976,652],{"class":201},[188,978,324],{"class":323},[188,980,657],{"class":201},[188,982,660],{"class":201},[188,984,341],{"class":193},[188,986,665],{"class":201},[188,988,317],{"class":193},[188,990,670],{"class":201},[188,992,324],{"class":323},[188,994,386],{"class":193},[188,996,998],{"class":112,"line":997},48,[188,999,393],{"emptyLinePlaceholder":392},[188,1001,1003],{"class":112,"line":1002},49,[188,1004,1005],{"class":399},"  \u002F* 3. Slow hue rotation: one registered angle drives both stops. *\u002F\n",[188,1007,1009,1011,1014,1016,1018,1020],{"class":112,"line":1008},50,[188,1010,406],{"class":323},[188,1012,1013],{"class":193}," --hue { syntax: \"\u003Cangle",[188,1015,412],{"class":323},[188,1017,415],{"class":193},[188,1019,418],{"class":197},[188,1021,1022],{"class":193},": 250deg; }\n",[188,1024,1026],{"class":112,"line":1025},51,[188,1027,393],{"emptyLinePlaceholder":392},[188,1029,1031,1034],{"class":112,"line":1030},52,[188,1032,1033],{"class":201},"  .aurora",[188,1035,461],{"class":193},[188,1037,1039,1041,1043,1045,1047],{"class":112,"line":1038},53,[188,1040,467],{"class":201},[188,1042,317],{"class":193},[188,1044,320],{"class":201},[188,1046,351],{"class":323},[188,1048,476],{"class":193},[188,1050,1052,1054,1056,1058,1060],{"class":112,"line":1051},54,[188,1053,482],{"class":201},[188,1055,317],{"class":193},[188,1057,487],{"class":201},[188,1059,351],{"class":323},[188,1061,476],{"class":193},[188,1063,1065,1067,1069,1071,1073],{"class":112,"line":1064},55,[188,1066,497],{"class":201},[188,1068,317],{"class":193},[188,1070,502],{"class":201},[188,1072,324],{"class":323},[188,1074,476],{"class":193},[188,1076,1078,1080,1082,1084],{"class":112,"line":1077},56,[188,1079,512],{"class":201},[188,1081,317],{"class":193},[188,1083,517],{"class":201},[188,1085,1086],{"class":193},"(\n",[188,1088,1090,1093,1095,1097],{"class":112,"line":1089},57,[188,1091,1092],{"class":201},"      90",[188,1094,526],{"class":323},[188,1096,529],{"class":323},[188,1098,1099],{"class":193}," oklch,\n",[188,1101,1103,1106,1108,1111,1113,1116,1119,1121,1124],{"class":112,"line":1102},58,[188,1104,1105],{"class":201},"      oklch",[188,1107,520],{"class":193},[188,1109,1110],{"class":201},"70",[188,1112,802],{"class":323},[188,1114,1115],{"class":201}," 0.15",[188,1117,1118],{"class":201}," var",[188,1120,520],{"class":193},[188,1122,1123],{"class":540},"--hue",[188,1125,1126],{"class":193},")),\n",[188,1128,1130,1132,1134,1136,1138,1140,1143,1145,1147,1149,1151,1153,1156,1159,1161],{"class":112,"line":1129},59,[188,1131,1105],{"class":201},[188,1133,520],{"class":193},[188,1135,1110],{"class":201},[188,1137,802],{"class":323},[188,1139,1115],{"class":201},[188,1141,1142],{"class":201}," calc",[188,1144,520],{"class":193},[188,1146,535],{"class":201},[188,1148,520],{"class":193},[188,1150,1123],{"class":540},[188,1152,826],{"class":193},[188,1154,1155],{"class":323},"+",[188,1157,1158],{"class":201}," 60",[188,1160,526],{"class":323},[188,1162,1163],{"class":193},"))\n",[188,1165,1167],{"class":112,"line":1166},60,[188,1168,1169],{"class":193},"    );\n",[188,1171,1173,1176,1179,1181,1184,1187,1190],{"class":112,"line":1172},61,[188,1174,1175],{"class":201},"    animation",[188,1177,1178],{"class":193},": drift ",[188,1180,502],{"class":201},[188,1182,1183],{"class":323},"s",[188,1185,1186],{"class":201}," linear",[188,1188,1189],{"class":201}," infinite",[188,1191,476],{"class":193},[188,1193,1195],{"class":112,"line":1194},62,[188,1196,589],{"class":193},[188,1198,1200,1203,1206,1208,1211,1213,1215,1217,1220,1222,1225],{"class":112,"line":1199},63,[188,1201,1202],{"class":323},"  @keyframes",[188,1204,1205],{"class":540}," drift",[188,1207,311],{"class":193},[188,1209,1210],{"class":201},"to",[188,1212,311],{"class":193},[188,1214,1123],{"class":540},[188,1216,317],{"class":193},[188,1218,1219],{"class":201},"610",[188,1221,526],{"class":323},[188,1223,1224],{"class":193},"; } }   ",[188,1226,1227],{"class":399},"\u002F* one full turn, 250 → 610 *\u002F\n",[188,1229,1231],{"class":112,"line":1230},64,[188,1232,393],{"emptyLinePlaceholder":392},[188,1234,1236,1239],{"class":112,"line":1235},65,[188,1237,1238],{"class":323},"  @media",[188,1240,1241],{"class":193}," (prefers-reduced-motion: reduce) {\n",[188,1243,1245,1248,1250,1253,1255,1258,1260,1262],{"class":112,"line":1244},66,[188,1246,1247],{"class":201},"    .tile",[188,1249,335],{"class":193},[188,1251,1252],{"class":201},".sheen",[188,1254,311],{"class":193},[188,1256,1257],{"class":201},"transition",[188,1259,317],{"class":193},[188,1261,134],{"class":201},[188,1263,386],{"class":193},[188,1265,1267,1270,1272,1275,1277,1279],{"class":112,"line":1266},67,[188,1268,1269],{"class":201},"    .aurora",[188,1271,311],{"class":193},[188,1273,1274],{"class":201},"animation",[188,1276,317],{"class":193},[188,1278,134],{"class":201},[188,1280,386],{"class":193},[188,1282,1284],{"class":112,"line":1283},68,[188,1285,589],{"class":193},[188,1287,1289,1292,1294],{"class":112,"line":1288},69,[188,1290,1291],{"class":193},"\u003C\u002F",[188,1293,300],{"class":197},[188,1295,205],{"class":323},[188,1297,1299,1301,1303],{"class":112,"line":1298},70,[188,1300,1291],{"class":193},[188,1302,233],{"class":197},[188,1304,205],{"class":323},[188,1306,1308,1310,1313],{"class":112,"line":1307},71,[188,1309,211],{"class":193},[188,1311,1312],{"class":197},"body",[188,1314,205],{"class":323},[188,1316,1318,1321,1324,1327,1330,1333,1335,1337,1339],{"class":112,"line":1317},72,[188,1319,1320],{"class":193},"  \u003C",[188,1322,1323],{"class":197},"div",[188,1325,1326],{"class":193}," class=\"tile\" tabindex=\"0\" role=\"img\" ",[188,1328,1329],{"class":197},"aria-label",[188,1331,1332],{"class":193},"=\"Gradient tile\"",[188,1334,412],{"class":323},[188,1336,1291],{"class":193},[188,1338,1323],{"class":197},[188,1340,205],{"class":323},[188,1342,1344,1346,1349,1352,1354,1357,1359],{"class":112,"line":1343},73,[188,1345,1320],{"class":193},[188,1347,1348],{"class":197},"button",[188,1350,1351],{"class":193}," class=\"sheen\" type=\"button\"",[188,1353,412],{"class":323},[188,1355,1356],{"class":193},"Upgrade\u003C\u002F",[188,1358,1348],{"class":197},[188,1360,205],{"class":323},[188,1362,1364,1366,1368,1371,1373,1376,1378,1380,1382],{"class":112,"line":1363},74,[188,1365,1320],{"class":193},[188,1367,1323],{"class":197},[188,1369,1370],{"class":193}," class=\"aurora\" role=\"img\" ",[188,1372,1329],{"class":197},[188,1374,1375],{"class":193},"=\"Slowly shifting colour band\"",[188,1377,412],{"class":323},[188,1379,1291],{"class":193},[188,1381,1323],{"class":197},[188,1383,205],{"class":323},[188,1385,1387,1389,1391],{"class":112,"line":1386},75,[188,1388,1291],{"class":193},[188,1390,1312],{"class":197},[188,1392,205],{"class":323},[188,1394,1396,1398,1400],{"class":112,"line":1395},76,[188,1397,1291],{"class":193},[188,1399,183],{"class":197},[188,1401,205],{"class":323},[14,1403,1404,1405,1408,1409,1411],{},"The ",[18,1406,1407],{},"in oklch"," after the gradient direction sets the interpolation space for the gradient's own colour blending, which keeps the midpoint between pink and amber vivid instead of muddy. The aurora's keyframe animates ",[18,1410,1123],{}," from 250 to 610 degrees — one full turn — and because hue is an angle, the rendering at 610 degrees is identical to 250, so the loop has no visible seam.",[43,1413,1415],{"id":1414},"the-key-technique-choose-the-cheapest-input-to-animate","The key technique: choose the cheapest input to animate",[14,1417,1418],{},"The three examples differ sharply in cost, and the difference guides which to use.",[57,1420,64,1423,64,1426,64,1429,64,1432,64,1438,64,1444,64,1449,64,1456,64,1460,64,1464,64,1468,64,1472,64,1476,64,1480,64,1484,64,1488],{"viewBox":1421,"role":60,"ariaLabel":1422,"xmlns":62,"style":63},"0 0 720 290","Cost comparison of animating background-position, registered colour properties and registered angle properties for gradients",[66,1424,1425],{},"What each gradient technique costs per frame",[70,1427,1428],{},"Moving an oversized gradient with background-position reuses the same image and is the cheapest. Registered colour and angle properties rebuild and repaint the gradient every frame, which is fine for small elements and short transitions but costly for large, continuous animations.",[74,1430,1431],{"textAnchor":76,"x":77,"y":78,"style":79},"Reuse the image when you can; rebuild it when you must",[82,1433],{"x":1434,"y":85,"width":1435,"height":1436,"rx":88,"fill":89,"opacity":1437},"40","640","54","0.34",[74,1439,1443],{"textAnchor":383,"x":1440,"y":1441,"style":1442},"60","80","text-anchor:start;fill:currentColor;font:600 13px ui-monospace,monospace","background-position",[74,1445,1448],{"textAnchor":383,"x":1440,"y":1446,"style":1447},"99","text-anchor:start;fill:currentColor;font:12px sans-serif","same image, new offset: cheapest",[74,1450,1455],{"textAnchor":1451,"x":1452,"y":1453,"style":1454},"end","660","89","text-anchor:end;fill:currentColor;font:12px sans-serif","sheens, shimmer, sweeps",[82,1457],{"x":1434,"y":1458,"width":1435,"height":1436,"rx":88,"fill":89,"opacity":1459},"122","0.22",[74,1461,1463],{"textAnchor":383,"x":1440,"y":1462,"style":1442},"146","@property \u003Ccolor>",[74,1465,1467],{"textAnchor":383,"x":1440,"y":1466,"style":1447},"165","rebuild + repaint each frame",[74,1469,1471],{"textAnchor":1451,"x":1452,"y":1470,"style":1454},"155","short hover colour shifts",[82,1473],{"x":1434,"y":1474,"width":1435,"height":1436,"rx":88,"fill":89,"opacity":1475},"188","0.12",[74,1477,1479],{"textAnchor":383,"x":1440,"y":1478,"style":1442},"212","@property \u003Cangle> loop",[74,1481,1483],{"textAnchor":383,"x":1440,"y":1482,"style":1447},"231","rebuild + repaint, continuously",[74,1485,1487],{"textAnchor":1451,"x":1452,"y":1486,"style":1454},"221","small accents, sparingly",[74,1489,1491],{"textAnchor":76,"x":77,"y":1490,"style":161},"274","None of these run on the compositor; profile large or continuous ones.",[14,1493,1494,1496,1497,1501],{},[18,1495,1443],{}," animation reuses the rasterised gradient and only changes where it is drawn, which is why it is the standard technique for shimmer effects such as ",[32,1498,1500],{"href":1499},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-loading-spinners-and-skeletons\u002F","skeleton loaders",". Registered-property animations are more expressive — they can change colours, stops and angles — but the browser must build a new gradient and repaint the element for every frame. That is inexpensive for a button-sized element over 400 milliseconds, and noticeably costly for a full-viewport hero animating forever.",[14,1503,1504,1505,1508,1509,1512],{},"When a large animated gradient is unavoidable, render it on a separate layer the size of the viewport, animate ",[18,1506,1507],{},"transform"," or ",[18,1510,1511],{},"opacity"," on overlapping static gradients instead of the gradient itself, or reduce its resolution with a small element scaled up. All of these keep the per-frame work off the main thread.",[43,1514,1516],{"id":1515},"colour-spaces-and-hue-direction-inside-the-gradient","Colour spaces and hue direction inside the gradient",[14,1518,1519,1520,1523,1524,1527],{},"There are two interpolations happening in an animated gradient, and both have a colour space. The first is ",[27,1521,1522],{},"across"," the gradient: how the browser blends from one stop to the next along its length. The second is ",[27,1525,1526],{},"over time",": how a registered colour property moves from its start value to its end value during the transition. Each can go through grey if it is done in sRGB between saturated, distant hues.",[14,1529,1530,1531,1534,1535,1538,1539,1542],{},"For the gradient itself, the colour interpolation method is written after the direction: ",[18,1532,1533],{},"linear-gradient(90deg in oklch, …)",". OKLCH keeps lightness and chroma steady while hue changes, so a blue-to-orange gradient passes through vivid intermediate colours rather than a grey band in the middle. When the two hues are far apart, a hue interpolation keyword chooses which way round the colour wheel to go: ",[18,1536,1537],{},"in oklch longer hue"," travels the long way, producing a rainbow-like sweep, while the default ",[18,1540,1541],{},"shorter hue"," takes the direct route.",[14,1544,1545,1546,1549,1550,1553],{},"For the transition over time, registered ",[18,1547,1548],{},"\u003Ccolor>"," properties interpolate in OKLab by default in current engines, which already avoids most muddy midpoints. Where a particular path matters — say, a hover that should pass through purple on the way from blue to pink — animating a registered ",[18,1551,1552],{},"\u003Cangle>"," for hue, as the aurora example does, gives complete control over the route, because the hue itself is the animated value.",[14,1555,1556,1557,1559],{},"The practical rule: write gradients ",[18,1558,1407],{},", animate hue as an angle when the path matters, and check the midpoint frame of any colour transition as carefully as its endpoints. A transition that looks good at 0% and 100% but passes through a dull grey at 50% will look broken to users even though no single frame is \"wrong\".",[43,1561,1563],{"id":1562},"variation-gradient-text-that-shifts-on-focus","Variation: gradient text that shifts on focus",[14,1565,1566,1567,1570],{},"Gradient text uses ",[18,1568,1569],{},"background-clip: text"," with transparent text colour. The same registered-property technique animates it, and it is a good example of where contrast needs checking at every frame, not just the endpoints.",[179,1572,1576],{"className":1573,"code":1574,"language":1575,"meta":184,"style":184},"language-css shiki shiki-themes github-light-high-contrast github-dark-high-contrast","@property --stop { syntax: \"\u003Cpercentage>\"; inherits: false; initial-value: 0%; }\n\n.gradient-link {\n  color: transparent;\n  background: linear-gradient(90deg in oklch, #4338ca var(--stop), #be185d calc(var(--stop) + 60%));\n  background-clip: text;\n  transition: --stop 500ms ease;\n  text-decoration: underline;\n  text-decoration-color: #4338ca;      \u002F* the underline keeps a solid colour *\u002F\n}\n\n.gradient-link:hover,\n.gradient-link:focus-visible {\n  --stop: 40%;\n}\n\n@media (forced-colors: active) {\n  .gradient-link { color: LinkText; background: none; }\n}\n","css",[18,1577,1578,1595,1599,1606,1617,1672,1683,1700,1712,1727,1732,1736,1743,1750,1763,1767,1771,1779,1801],{"__ignoreMap":184},[188,1579,1580,1583,1586,1588,1590,1592],{"class":112,"line":190},[188,1581,1582],{"class":323},"@property",[188,1584,1585],{"class":193}," --stop { syntax: \"\u003Cpercentage",[188,1587,412],{"class":323},[188,1589,415],{"class":193},[188,1591,418],{"class":197},[188,1593,1594],{"class":193},": 0%; }\n",[188,1596,1597],{"class":112,"line":208},[188,1598,393],{"emptyLinePlaceholder":392},[188,1600,1601,1604],{"class":112,"line":228},[188,1602,1603],{"class":201},".gradient-link",[188,1605,461],{"class":193},[188,1607,1608,1611,1613,1615],{"class":112,"line":238},[188,1609,1610],{"class":201},"  color",[188,1612,317],{"class":193},[188,1614,796],{"class":201},[188,1616,476],{"class":193},[188,1618,1619,1622,1624,1626,1628,1631,1633,1635,1637,1640,1642,1644,1647,1649,1652,1654,1656,1658,1660,1662,1664,1666,1668,1670],{"class":112,"line":256},[188,1620,1621],{"class":201},"  background",[188,1623,317],{"class":193},[188,1625,517],{"class":201},[188,1627,520],{"class":193},[188,1629,1630],{"class":201},"90",[188,1632,526],{"class":323},[188,1634,529],{"class":323},[188,1636,532],{"class":193},[188,1638,1639],{"class":201},"#4338ca",[188,1641,1118],{"class":201},[188,1643,520],{"class":193},[188,1645,1646],{"class":540},"--stop",[188,1648,544],{"class":193},[188,1650,1651],{"class":201},"#be185d",[188,1653,1142],{"class":201},[188,1655,520],{"class":193},[188,1657,535],{"class":201},[188,1659,520],{"class":193},[188,1661,1646],{"class":540},[188,1663,826],{"class":193},[188,1665,1155],{"class":323},[188,1667,1158],{"class":201},[188,1669,802],{"class":323},[188,1671,554],{"class":193},[188,1673,1674,1677,1679,1681],{"class":112,"line":281},[188,1675,1676],{"class":201},"  background-clip",[188,1678,317],{"class":193},[188,1680,74],{"class":201},[188,1682,476],{"class":193},[188,1684,1685,1688,1691,1694,1696,1698],{"class":112,"line":295},[188,1686,1687],{"class":201},"  transition",[188,1689,1690],{"class":193},": --stop ",[188,1692,1693],{"class":201},"500",[188,1695,569],{"class":323},[188,1697,572],{"class":201},[188,1699,476],{"class":193},[188,1701,1702,1705,1707,1710],{"class":112,"line":305},[188,1703,1704],{"class":201},"  text-decoration",[188,1706,317],{"class":193},[188,1708,1709],{"class":201},"underline",[188,1711,476],{"class":193},[188,1713,1714,1717,1719,1721,1724],{"class":112,"line":389},[188,1715,1716],{"class":201},"  text-decoration-color",[188,1718,317],{"class":193},[188,1720,1639],{"class":201},[188,1722,1723],{"class":193},";      ",[188,1725,1726],{"class":399},"\u002F* the underline keeps a solid colour *\u002F\n",[188,1728,1729],{"class":112,"line":396},[188,1730,1731],{"class":193},"}\n",[188,1733,1734],{"class":112,"line":403},[188,1735,393],{"emptyLinePlaceholder":392},[188,1737,1738,1741],{"class":112,"line":429},[188,1739,1740],{"class":201},".gradient-link:hover",[188,1742,598],{"class":193},[188,1744,1745,1748],{"class":112,"line":450},[188,1746,1747],{"class":201},".gradient-link:focus-visible",[188,1749,461],{"class":193},[188,1751,1752,1755,1757,1759,1761],{"class":112,"line":455},[188,1753,1754],{"class":540},"  --stop",[188,1756,317],{"class":193},[188,1758,1434],{"class":201},[188,1760,802],{"class":323},[188,1762,476],{"class":193},[188,1764,1765],{"class":112,"line":464},[188,1766,1731],{"class":193},[188,1768,1769],{"class":112,"line":479},[188,1770,393],{"emptyLinePlaceholder":392},[188,1772,1773,1776],{"class":112,"line":494},[188,1774,1775],{"class":323},"@media",[188,1777,1778],{"class":193}," (forced-colors: active) {\n",[188,1780,1781,1784,1786,1789,1792,1795,1797,1799],{"class":112,"line":509},[188,1782,1783],{"class":201},"  .gradient-link",[188,1785,311],{"class":193},[188,1787,1788],{"class":201},"color",[188,1790,1791],{"class":193},": LinkText; ",[188,1793,1794],{"class":201},"background",[188,1796,317],{"class":193},[188,1798,134],{"class":201},[188,1800,386],{"class":193},[188,1802,1803],{"class":112,"line":557},[188,1804,1731],{"class":193},[14,1806,1404,1807,1810],{},[18,1808,1809],{},"forced-colors"," rule is not optional: in Windows High Contrast and similar modes, background images are removed, and transparent text would become invisible. Restoring a system colour keeps the link readable. Both gradient endpoints must individually meet text contrast against the page, since each part of the word spends time at each colour.",[43,1812,1814],{"id":1813},"browser-support","Browser support",[14,1816,1817,1819,1820,1822,1823,1826,1827,1829,1830,1832,1833,1836,1837,1839],{},[18,1818,1582],{}," is supported in Chrome and Edge 85+, Firefox 128+ and Safari 16.4+; without it, registered-property animations jump at the end instead of interpolating. Gradient interpolation colour spaces (",[18,1821,1407],{},") and ",[18,1824,1825],{},"oklch()"," colours are supported in current versions of all three engines. ",[18,1828,1443],{}," animation and ",[18,1831,1569],{}," are universally supported in current browsers, with ",[18,1834,1835],{},"-webkit-background-clip: text"," still worth including for older WebKit. ",[18,1838,1809],{}," is supported in Chrome 89+, Edge 79+, Firefox 89+ and Safari 16+.",[43,1841,1843],{"id":1842},"faq","FAQ",[14,1845,1846,1850,1852,1853,1855],{},[1847,1848,1849],"strong",{},"Why does my gradient jump instead of transitioning?",[18,1851,24],{}," is not an interpolable property, so a transition between two gradients switches instantly at the end. Animate the parts instead: register the colours or stop positions as custom properties with ",[18,1854,1582],{}," and transition those, and the gradient is rebuilt smoothly every frame.",[14,1857,1858,1861,1862,1865,1866,1868],{},[1847,1859,1860],{},"What is the cheapest way to animate a gradient?","\nMake the gradient larger than its element with ",[18,1863,1864],{},"background-size"," and animate ",[18,1867,1443],{},". The gradient is drawn once and only its offset changes, which avoids rebuilding the image each frame. Registered-property animations are more flexible but repaint every frame.",[14,1870,1871,1874,1875,1877,1878,1880,1881,1884],{},[1847,1872,1873],{},"Why does my animated gradient pass through grey?","\nThe colours are interpolated in sRGB, where the straight line between two saturated complementary colours passes near grey. Interpolate the gradient in ",[18,1876,172],{},", with ",[18,1879,1407],{}," after the gradient direction, and pick a hue direction such as ",[18,1882,1883],{},"longer hue"," so the path stays saturated.",[14,1886,1887,1890,1891,173],{},[1847,1888,1889],{},"Should animated gradient backgrounds loop forever?","\nRarely. Large, slowly shifting gradients behind text are distracting and can trigger vestibular discomfort. If a background must move, keep it slow and subtle, stop it after a few cycles or when off screen, and disable it entirely for ",[18,1892,1893],{},"prefers-reduced-motion",[43,1895,1897],{"id":1896},"related","Related",[1899,1900,1901,1907,1914,1921],"ul",{},[1902,1903,1904,1906],"li",{},[32,1905,35],{"href":34}," — the parent guide.",[1902,1908,1909,1913],{},[32,1910,1912],{"href":1911},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fanimated-gradient-borders-with-property\u002F","Animated Gradient Borders With @property"," — the same technique applied to a border ring.",[1902,1915,1916,1920],{},[32,1917,1919],{"href":1918},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fregistered-properties-and-type-safety\u002F","Registered Properties and Type Safety"," — why registration enables interpolation.",[1902,1922,1923,1927],{},[32,1924,1926],{"href":1925},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Faspect-ratio-for-responsive-media\u002F","Aspect Ratio for Responsive Media"," — sizing the boxes these gradients fill.",[300,1929,1930],{},"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 .sh5d0, html code.shiki .sh5d0{--shiki-default:#6E011A;--shiki-default-font-style:italic;--shiki-dark:#FFB1AF;--shiki-dark-font-style:italic}html pre.shiki code .soyes, html code.shiki .soyes{--shiki-default:#702C00;--shiki-dark:#FFB757}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":184,"searchDepth":208,"depth":208,"links":1932},[1933,1934,1935,1936,1937,1938,1939,1940],{"id":45,"depth":208,"text":46},{"id":165,"depth":208,"text":166},{"id":1414,"depth":208,"text":1415},{"id":1515,"depth":208,"text":1516},{"id":1562,"depth":208,"text":1563},{"id":1813,"depth":208,"text":1814},{"id":1842,"depth":208,"text":1843},{"id":1896,"depth":208,"text":1897},"Gradients do not interpolate, but their parts can: registered colour and position properties, background-position sweeps, hue rotation in oklch, and the costs.","md",{"pageTitle":1944,"datePublished":1945,"dateModified":1945,"faq":1946},"Animating CSS Gradients Smoothly","2026-09-18",[1947,1949,1951,1953],{"q":1849,"a":1948},"background-image is not an interpolable property, so a transition between two gradients switches instantly at the end. Animate the parts instead: register the colours or stop positions as custom properties with @property and transition those, and the gradient is rebuilt smoothly every frame.",{"q":1860,"a":1950},"Make the gradient larger than its element with background-size and animate background-position. The gradient is drawn once and only its offset changes, which avoids rebuilding the image each frame. Registered-property animations are more flexible but repaint every frame.",{"q":1873,"a":1952},"The colours are interpolated in sRGB, where the straight line between two saturated complementary colours passes near grey. Interpolate the gradient in oklch, with in oklch after the gradient direction, and pick a hue direction such as longer hue so the path stays saturated.",{"q":1889,"a":1954},"Rarely. Large, slowly shifting gradients behind text are distracting and can trigger vestibular discomfort. If a background must move, keep it slow and subtle, stop it after a few cycles or when off screen, and disable it entirely for prefers-reduced-motion.","\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fanimating-gradients",{"title":5,"description":1941},"css-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fanimating-gradients\u002Findex","WvKh9Q_5fjWsLi2VWUYKJmv6oR7U2HvMPDvy7kh2PxY",[1960,1963,1966,1969,1972,1975,1978,1981,1984,1987,1990,1993,1996,1999,2002,2005,2006,2009,2012,2015,2018,2021,2024,2027,2030,2033,2036,2039,2042,2045,2048,2051,2054,2057,2060,2063,2066,2069,2072,2075,2078,2081,2084,2087,2090,2093,2096,2099,2102,2105,2108,2111,2114,2117,2120,2123,2126,2129,2132,2135,2138,2141,2144,2147,2150,2153,2156,2159,2162,2165,2168,2171,2174,2177,2180,2183,2186,2189,2192,2195,2198,2201,2204,2207,2210,2213,2216,2219,2222,2225,2228,2231,2234,2237,2239,2242,2245,2248,2251,2254,2257,2260,2263,2266,2269,2272,2275,2278,2281,2284,2287,2290,2293,2296,2299,2302,2305,2308,2311,2314,2317,2320,2323,2326,2329,2332,2335,2338,2341,2344,2347,2350,2353,2356,2359,2362,2365,2368,2371,2374,2377,2380,2383,2386,2389,2392,2395,2398,2401,2404,2407,2410,2413,2416,2419,2422,2425,2428,2431,2434,2437,2440,2443,2446,2449,2452,2455,2458,2461,2464,2467,2470,2473,2476,2479,2482,2485,2488,2491,2494,2497,2500,2503,2506,2509,2512,2515],{"path":1961,"title":1962},"\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":1964,"title":1965},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fflashing-content-and-seizure-thresholds","Flashing Content and Seizure Thresholds",{"path":1967,"title":1968},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fforced-colors-mode-and-animations","Forced Colors Mode and Animations",{"path":1970,"title":1971},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations","Accessibility in CSS Animations: Patterns, Specs & Best Practices",{"path":1973,"title":1974},"\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":1976,"title":1977},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fprefers-reduced-motion-recipes","prefers-reduced-motion Recipes: A Reduction for Every Common Effect",{"path":1979,"title":1980},"\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":1982,"title":1983},"\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":1985,"title":1986},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fvestibular-safe-animation-patterns","Vestibular-Safe Animation Patterns: Why Some Motion Makes People Sick",{"path":1988,"title":1989},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fwcag-motion-success-criteria","WCAG Motion Success Criteria: What Each One Actually Requires",{"path":1991,"title":1992},"\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":1994,"title":1995},"\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":1997,"title":1998},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations","Clip-Path & Mask Animations: Animating Visibility Instead of Position",{"path":2000,"title":2001},"\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":2003,"title":2004},"\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":1955,"title":5},{"path":2007,"title":2008},"\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":2010,"title":2011},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions","Color & Theme Transitions: Colour as Part of the Motion System",{"path":2013,"title":2014},"\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":2016,"title":2017},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fsmooth-theme-switching-transitions","Smooth Theme Switching: Crossfades, Circular Reveals and No Flash",{"path":2019,"title":2020},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fcontainer-query-hover-affordances","Container Query Hover Affordances: When Narrow Means Persistent, Not Hidden",{"path":2022,"title":2023},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion","Container-Aware Motion: Animation Sized by the Space a Component Actually Has",{"path":2025,"title":2026},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Flayout-change-animations-at-container-breakpoints","Animating Changes at Container Breakpoints",{"path":2028,"title":2029},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fmotion-driven-by-container-style-queries","Motion Driven by Container Style Queries",{"path":2031,"title":2032},"\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":2034,"title":2035},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fsuppressing-motion-in-small-containers","Suppressing Motion in Small Containers: Deliberately Animating Nothing",{"path":2037,"title":2038},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fcontrolling-css-animations-from-javascript","Controlling CSS Animations From JavaScript",{"path":2040,"title":2041},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api","CSS Animation vs the Web Animations API: A Decision Guide",{"path":2043,"title":2044},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fwaapi-vs-css-for-interruptible-ui","Interruptible UI: CSS Transitions vs WAAPI",{"path":2046,"title":2047},"\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":2049,"title":2050},"\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":2052,"title":2053},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fcustom-property-fallbacks-and-invalid-values","Custom Property Fallbacks and Invalid Values",{"path":2055,"title":2056},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Ffluid-spacing-tokens-driving-transition-durations","Fluid Spacing Tokens That Drive Transition Durations",{"path":2058,"title":2059},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture","CSS Custom Properties Architecture: Scalable Design Systems & Dynamic UI",{"path":2061,"title":2062},"\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":2064,"title":2065},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fscoping-custom-properties-to-components","Scoping Custom Properties to Components",{"path":2067,"title":2068},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fcss-transition-timing-functions","CSS Transition Timing Functions: ease, cubic-bezier(), steps() and linear()",{"path":2070,"title":2071},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals","CSS Transition Fundamentals: Architecture, Performance & Patterns",{"path":2073,"title":2074},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Finterrupted-and-reversing-transitions","Interrupted and Reversing Transitions: What Happens Mid-Flight",{"path":2076,"title":2077},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fstarting-style-entry-animations","@starting-style: Animating an Element's Very First Style Change",{"path":2079,"title":2080},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-delay-choreography","Choreographing Motion With transition-delay",{"path":2082,"title":2083},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-shorthand-and-multiple-properties","The transition Shorthand and Multiple Properties",{"path":2085,"title":2086},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransitioning-display-with-allow-discrete","Transitioning display with transition-behavior: allow-discrete and @starting-style",{"path":2088,"title":2089},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fanimating-dialog-open-and-close","Animating \u003Cdialog> Open and Close: Both Directions, No Library",{"path":2091,"title":2092},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fbackdrop-animations","Animating ::backdrop: Fades and Blurs Behind Dialogs and Popovers",{"path":2094,"title":2095},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations","Dialog & Popover Animations: Motion for the Top Layer",{"path":2097,"title":2098},"\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":2100,"title":2101},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fpopover-entry-and-exit-transitions","Popover Menus That Animate From Their Anchor",{"path":2103,"title":2104},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fchoosing-animation-durations","Choosing Animation Durations: How Long Motion Should Last",{"path":2106,"title":2107},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fcubic-bezier-overshoot-and-anticipation","Overshoot and Anticipation With cubic-bezier(): Motion With Character",{"path":2109,"title":2110},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fentry-vs-exit-easing","Entry vs Exit Easing: Different Curves for Arriving and Leaving",{"path":2112,"title":2113},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design","Easing & Motion Design: Making CSS Motion Feel Intentional",{"path":2115,"title":2116},"\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":2118,"title":2119},"\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":2121,"title":2122},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Faccessible-css-only-tooltips","Accessible CSS-Only Tooltips and Hover Cards With  and ",{"path":2124,"title":2125},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fbutton-press-and-active-states","Button Press and  States",{"path":2127,"title":2128},"\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":2130,"title":2131},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Ffocus-within-form-patterns"," Form Patterns: Styling a Group From the Field Inside It",{"path":2133,"title":2134},"\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":2136,"title":2137},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design","Hover & Focus State Design: Spec-Compliant Patterns for Modern UIs",{"path":2139,"title":2140},"\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":2142,"title":2143},"\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":2145,"title":2146},"\u002Fcss-only-micro-interactions-animations","CSS-Only Micro-Interactions & Animations: Architecture, Performance & Implementation",{"path":2148,"title":2149},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fanimation-composition-and-stacking","Stacking Animations With animation-composition",{"path":2151,"title":2152},"\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":2154,"title":2155},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcontainer-query-triggered-keyframe-animations","Container-Query-Triggered Keyframe Animations: Animate Differently per Available Space",{"path":2157,"title":2158},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-accordions-and-disclosure","CSS-Only Accordions and Disclosure Widgets with details and summary",{"path":2160,"title":2161},"\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":2163,"title":2164},"\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":2166,"title":2167},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns","Keyframe Animation Patterns: Spec-Compliant Architectures for Modern UIs",{"path":2169,"title":2170},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fmulti-step-keyframes-and-per-keyframe-easing","Multi-Step Keyframes and Per-Keyframe Easing",{"path":2172,"title":2173},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fstaggered-list-animations-with-custom-properties","Staggered List Animations Using --i Index Custom Properties",{"path":2175,"title":2176},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fanimating-box-shadow-and-filters-cheaply","Animating box-shadow and Filters Cheaply",{"path":2178,"title":2179},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcontain-property-for-animation-performance","The contain Property for Animation Performance",{"path":2181,"title":2182},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcss-triggers-layout-paint-composite","Layout, Paint and Composite: What Triggers What",{"path":2184,"title":2185},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration","Performance & GPU Acceleration in CSS: A Developer’s Blueprint",{"path":2187,"title":2188},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Foptimizing-css-animations-for-60fps","Optimizing CSS Animations for 60fps: Budgeting the Frame",{"path":2190,"title":2191},"\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":2193,"title":2194},"\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":2196,"title":2197},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations","Scroll-Driven Animations: Binding Motion to Scroll Position in Pure CSS",{"path":2199,"title":2200},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-animation-fallbacks","Shipping Scroll-Driven Animations Without Breaking Anything",{"path":2202,"title":2203},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-parallax-effects","Scroll-Driven Parallax Effects in CSS",{"path":2205,"title":2206},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-progress-bar-without-javascript","A Reading Progress Bar Driven by scroll(root)",{"path":2208,"title":2209},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-triggered-reveal-animations","Reveal-on-Scroll with view() and animation-range",{"path":2211,"title":2212},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Ftimeline-scope-for-cross-element-animations","timeline-scope for Cross-Element Animations",{"path":2214,"title":2215},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fview-timeline-and-animation-range","View Timelines and animation-range",{"path":2217,"title":2218},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fcross-document-view-transitions","Cross-Document View Transitions",{"path":2220,"title":2221},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers","View Transitions for CSS Developers: the Pseudo-Element Tree, Snapshots, and Named Elements",{"path":2223,"title":2224},"\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":2226,"title":2227},"\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":2229,"title":2230},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transition-types-and-classes","View Transition Types and Classes",{"path":2232,"title":2233},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-for-list-reordering","View Transitions for List Reordering",{"path":2235,"title":2236},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-with-reduced-motion","Honouring prefers-reduced-motion in View Transitions",{"path":327,"title":2238},"Modern CSS Layouts & Micro-Interactions",{"path":2240,"title":2241},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioned-tooltips","Anchor-Positioned Tooltips: Tethering, Flipping, and Getting the Semantics Right",{"path":2243,"title":2244},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioning-fallbacks","Anchor Positioning Fallbacks: A Graceful Floor for Older Browser Versions",{"path":2246,"title":2247},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-size-for-matching-widths","anchor-size(): Overlays That Match Their Trigger's Size",{"path":2249,"title":2250},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays","CSS Anchor Positioning and Overlays: Tethering Elements Without JavaScript",{"path":2252,"title":2253},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-attribute-and-css-styling","The popover Attribute: Top-Layer Overlays With No JavaScript",{"path":2255,"title":2256},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-light-dismiss-and-stacking","Popover Light Dismiss, Nesting and Stacking",{"path":2258,"title":2259},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fposition-area-grid-explained","position-area: The Anchor Placement Grid",{"path":2261,"title":2262},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fcontainer-query-polyfill-tradeoffs","Container Query Polyfills: What They Cost and When to Skip Them",{"path":2264,"title":2265},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ffeature-detection-with-supports","Feature Detection with @supports: Syntax, Semantics, and the Traps",{"path":2267,"title":2268},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fhandling-container-query-fallbacks-for-older-browsers","Handling Container Query Fallbacks for Older Browsers",{"path":2270,"title":2271},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks","Container Query Fallbacks: Spec-Compliant CSS Strategies for Legacy Browsers",{"path":2273,"title":2274},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fintrinsic-layout-fallbacks-without-queries","Intrinsic Layout Fallbacks: Baselines That Adapt Without Any Query",{"path":2276,"title":2277},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ftesting-fallbacks-without-old-browsers","Testing CSS Fallbacks Without an Old Browser",{"path":2279,"title":2280},"\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":2282,"title":2283},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-query-range-and-logic-operators","Container Query Range Syntax and Logic Operators",{"path":2285,"title":2286},"\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":2288,"title":2289},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-type-size-vs-inline-size","Choosing container-type: inline-size, size, or normal",{"path":2291,"title":2292},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-vs-media-queries-comparison","Container vs Media Queries: Choosing the Right Reference Box",{"path":2294,"title":2295},"\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":2297,"title":2298},"\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":2300,"title":2301},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics","Container Query Syntax Basics",{"path":2303,"title":2304},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fnesting-and-naming-container-queries","Nesting and Naming Container Queries: Targeting the Right Ancestor",{"path":2306,"title":2307},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fauto-fit-minmax-responsive-grids","Responsive Grids with repeat(auto-fit, minmax())",{"path":2309,"title":2310},"\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":2312,"title":2313},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fgrid-auto-flow-dense-packing","grid-auto-flow: dense for Packed Layouts",{"path":2315,"title":2316},"\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":2318,"title":2319},"\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":2321,"title":2322},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts","CSS Grid and Subgrid Layouts for Responsive Interfaces",{"path":2324,"title":2325},"\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":2327,"title":2328},"\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":2330,"title":2331},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fsubgrid-vs-nested-grid","Subgrid vs an Independently Nested Grid",{"path":2333,"title":2334},"\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":2336,"title":2337},"\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":2339,"title":2340},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-grow-and-flex-shrink-explained","flex-grow and flex-shrink Explained",{"path":2342,"title":2343},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-wrap-intrinsic-responsive-rows","Breakpoint-Free Responsive Rows With flex-wrap and flex-basis",{"path":2345,"title":2346},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflexbox-gap-and-spacing","Flexbox gap vs Margins: Spacing Items Without Edge Hacks",{"path":2348,"title":2349},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns","Flexbox Layout Patterns: One-Dimensional Layout for Real Components",{"path":2351,"title":2352},"\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":2354,"title":2355},"\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":2357,"title":2358},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fdebugging-clamp-values","Debugging clamp(): Values That Are Ignored, Stuck or Never Fluid",{"path":2360,"title":2361},"\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":2363,"title":2364},"\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":2366,"title":2367},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-type-accessibility-and-zoom","Fluid Type, Accessibility and Zoom: The vw-Only Trap",{"path":2369,"title":2370},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-typography-without-javascript","Fluid Typography Without JavaScript: A Precision CSS Reference",{"path":2372,"title":2373},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp","Fluid Typography with clamp(): A Practical Guide for Modern CSS",{"path":2375,"title":2376},"\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":2378,"title":2379},"\u002Fmastering-container-queries-responsive-layouts","Mastering Container Queries & Responsive Layouts",{"path":2381,"title":2382},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Faspect-ratio-for-responsive-media","Using aspect-ratio for Responsive Media and Preventing Layout Shift",{"path":2384,"title":2385},"\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":2387,"title":2388},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques","Intrinsic Sizing Techniques: Modern CSS Layouts for Responsive UI",{"path":2390,"title":2391},"\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":2393,"title":2394},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fmin-max-fit-content-explained","min-content, max-content, and fit-content() Explained",{"path":2396,"title":2397},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fobject-fit-and-object-position","object-fit and object-position: Images That Fit Any Box",{"path":2399,"title":2400},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fpreventing-flex-and-grid-overflow","The min-width: auto Trap in Flex and Grid Layouts",{"path":2402,"title":2403},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-for-reset-and-tokens","Cascade Layers for Reset and Design Tokens",{"path":2405,"title":2406},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-vs-specificity-hacks","Cascade Layers vs Specificity Hacks: Ordering Instead of Escalating",{"path":2408,"title":2409},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcss-scope-for-component-styles","@scope for Component Styles: Short Selectors That Cannot Leak",{"path":2411,"title":2412},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies","Modern CSS Reset Strategies: A Spec-Compliant Foundation",{"path":2414,"title":2415},"\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":2417,"title":2418},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fwriting-a-minimal-modern-reset","Writing a Minimal Modern CSS Reset: Every Line Justified",{"path":2420,"title":2421},"\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":2423,"title":2424},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fempty-and-loading-states-with-has","Empty and Loading States With ()",{"path":2426,"title":2427},"\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":2429,"title":2430},"\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":2432,"title":2433},"\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":2435,"title":2436},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has","Parent-Aware Layouts With :has(): Letting Containers React to Their Contents",{"path":2438,"title":2439},"\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":2441,"title":2442},"\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":2444,"title":2445},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-data-tables","Container Query Data Tables: Reflowing Tables to Cards",{"path":2447,"title":2448},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-sidebar-layouts","Container Query Sidebar Layouts That Travel Between Contexts",{"path":2450,"title":2451},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns","Responsive Component Patterns: Architecture & Implementation",{"path":2453,"title":2454},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-forms-with-container-queries","Responsive Forms with Container Queries: Reflow Without Losing the Wiring",{"path":2456,"title":2457},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-hero-sections-with-container-queries","Responsive Hero Sections With Container Queries",{"path":2459,"title":2460},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-navigation-without-media-queries","Responsive Navigation Without Media Queries Using Container Queries",{"path":2462,"title":2463},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-pricing-tables","Responsive Pricing Tables: Aligned Features, a Clear Recommendation, Any Width",{"path":2465,"title":2466},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Ftabs-that-become-accordions","Tabs That Become an Accordion: One Component, Two Layouts",{"path":2468,"title":2469},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fcss-only-carousel-with-scroll-snap","A CSS-Only Carousel With Scroll Snap",{"path":2471,"title":2472},"\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":2474,"title":2475},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts","Scroll Snap & Overflow Layouts: Designing Components That Scroll on Purpose",{"path":2477,"title":2478},"\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":2480,"title":2481},"\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":2483,"title":2484},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fcombining-size-and-style-queries","Combining Size and Style Container Queries",{"path":2486,"title":2487},"\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":2489,"title":2490},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state","Style Queries and Container State: Token-Driven Component Variants",{"path":2492,"title":2493},"\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":2495,"title":2496},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fstyle-query-component-variants","Component Variants With Style Queries: One Token, Many Looks",{"path":2498,"title":2499},"\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":2501,"title":2502},"\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":2504,"title":2505},"\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":2507,"title":2508},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout","Viewport Units & Mobile Layout: Designing for the Screen You Actually Get",{"path":2510,"title":2511},"\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":2513,"title":2514},"\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":2516,"title":2517},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Fvirtual-keyboard-and-interactive-widget","Layouts That Survive the Virtual Keyboard",{"title":2519,"caption":2520,"height":2521,"html":2522,"css":2523},"Three ways to animate a gradient","Hover or focus the tile to shift its colours, hover the button for a sheen sweep, and watch the bottom band slowly rotate its hue.",380,"\n\u003Cdiv class=\"tile\" tabindex=\"0\" role=\"img\" aria-label=\"Gradient tile\">\u003C\u002Fdiv>\n\u003Cbutton class=\"sheen\" type=\"button\">Upgrade\u003C\u002Fbutton>\n\u003Cdiv class=\"aurora\" role=\"img\" aria-label=\"Slowly shifting colour band\">\u003C\u002Fdiv>","\nbody { display: grid; gap: 1.25rem; justify-items: center; align-content: center; }\n@property --from { syntax: \"\u003Ccolor>\"; inherits: false; initial-value: #6366f1; }\n@property --to { syntax: \"\u003Ccolor>\"; inherits: false; initial-value: #22d3ee; }\n.tile { width: 16rem; height: 6rem; border-radius: 12px; background: linear-gradient(135deg in oklch, var(--from), var(--to)); transition: --from 400ms ease, --to 400ms ease; }\n.tile:hover, .tile:focus-visible { --from: #ec4899; --to: #f59e0b; }\n.tile:focus-visible { outline: 2px solid var(--demo-fg); outline-offset: 3px; }\n.sheen {\n  padding: 0.7rem 1.4rem;\n  border: 0;\n  border-radius: 8px;\n  color: #ffffff;\n  font: inherit;\n  background: linear-gradient(110deg, transparent 35%, rgb(255 255 255 \u002F 0.35) 50%, transparent 65%) 0 0 \u002F 250% 100% no-repeat, #1d4ed8;\n  background-position: 100% 0, 0 0;\n  transition: background-position 700ms ease;\n}\n.sheen:hover, .sheen:focus-visible { background-position: 0% 0, 0 0; }\n.sheen:focus-visible { outline: 2px solid var(--demo-fg); outline-offset: 3px; }\n@property --hue { syntax: \"\u003Cangle>\"; inherits: false; initial-value: 250deg; }\n.aurora { width: 16rem; height: 6rem; border-radius: 12px; background: linear-gradient(90deg in oklch, oklch(70% 0.15 var(--hue)), oklch(70% 0.15 calc(var(--hue) + 60deg))); animation: drift 12s linear infinite; }\n@keyframes drift { to { --hue: 610deg; } }\n@media (prefers-reduced-motion: reduce) {\n  .tile, .sheen { transition: none; }\n  .aurora { animation: none; }\n}",1789717749270]