[{"data":1,"prerenderedAt":2342},["ShallowReactive",2],{"page-\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fanimated-gradient-borders-with-property":3,"content-all-pages":1777,"live-demo:gradient-border-spin":2336},{"id":4,"title":5,"body":6,"description":1758,"extension":1759,"meta":1760,"navigation":428,"path":1773,"seo":1774,"stem":1775,"__hash__":1776},"content\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fanimated-gradient-borders-with-property\u002Findex.md","Animated Gradient Borders With @property: A Spinning Highlight Without Extra Elements",{"type":7,"value":8,"toc":1747},"minimark",[9,19,42,47,58,70,73,128,148,225,229,232,236,1035,1044,1048,1057,1130,1151,1162,1166,1172,1198,1205,1209,1215,1426,1433,1437,1440,1624,1627,1631,1649,1653,1666,1683,1689,1708,1712,1744],[10,11,13,14,18],"h1",{"id":12},"animated-gradient-borders-with-property-a-spinning-highlight-without-extra-elements","Animated Gradient Borders With ",[15,16,17],"code",{},"@property",": A Spinning Highlight Without Extra Elements",[20,21,22,23,26,27,30,31,36,37,41],"p",{},"A rotating gradient border — light sweeping around the edge of a card — is a popular way to mark a featured plan, a live item or a call to action. The usual implementations either rotate an oversized pseudo-element behind the card and hide the excess with ",[15,24,25],{},"overflow: hidden",", or use ",[15,28,29],{},"border-image"," and lose rounded corners. The narrow problem this page solves is a rounded, crisp gradient border that animates with one element and a few declarations, driven by a registered custom property. It belongs to ",[32,33,35],"a",{"href":34},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002F","Clip-Path & Mask Animations"," 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-a-registered-property","Why a registered property",[20,48,49,50,53,54,57],{},"A ",[15,51,52],{},"conic-gradient()"," has a starting angle: ",[15,55,56],{},"conic-gradient(from 90deg, …)",". Rotating the border means animating that angle. But the gradient is an image, and images do not interpolate — writing two keyframes with different gradients produces a hard switch at the halfway point.",[20,59,60,61,65,66,69],{},"The standard workaround is to rotate the ",[62,63,64],"em",{},"element"," that paints the gradient with ",[15,67,68],{},"transform: rotate()",", which does interpolate. That works for a square pseudo-element hidden behind a card, but it wastes pixels painting the corners that get clipped away, and the rotating square's diagonal must exceed the card's, so it has to be larger than the card by a factor that depends on the aspect ratio.",[20,71,72],{},"The cleaner route is to put the angle in a custom property and register it:",[74,75,80],"pre",{"className":76,"code":77,"language":78,"meta":79,"style":79},"language-css shiki shiki-themes github-light-high-contrast github-dark-high-contrast","@property --angle {\n  syntax: \"\u003Cangle>\";\n  inherits: false;\n  initial-value: 0deg;\n}\n","css","",[15,81,82,94,106,112,122],{"__ignoreMap":79},[83,84,87,90],"span",{"class":85,"line":86},"line",1,[83,88,17],{"class":89},"sHUrx",[83,91,93],{"class":92},"suds8"," --angle {\n",[83,95,97,100,103],{"class":85,"line":96},2,[83,98,99],{"class":92},"  syntax: \"\u003Cangle",[83,101,102],{"class":89},">",[83,104,105],{"class":92},"\";\n",[83,107,109],{"class":85,"line":108},3,[83,110,111],{"class":92},"  inherits: false;\n",[83,113,115,119],{"class":85,"line":114},4,[83,116,118],{"class":117},"sne4z","  initial-value",[83,120,121],{"class":92},": 0deg;\n",[83,123,125],{"class":85,"line":124},5,[83,126,127],{"class":92},"}\n",[20,129,130,131,134,135,138,139,142,143,147],{},"Registered with an ",[15,132,133],{},"\u003Cangle>"," syntax, ",[15,136,137],{},"--angle"," becomes a typed value that the animation engine can interpolate. The gradient reads ",[15,140,141],{},"var(--angle)",", so each frame the browser computes a new angle and repaints the gradient with it. No transform, no oversized element. The general mechanism is explained in ",[32,144,146],{"href":145},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fanimating-custom-properties-with-at-property\u002F","Animating Custom Properties With @property",".",[149,150,156,157,156,161,156,165,156,173,156,181,156,183,156,190,156,196,156,203,156,207,156,211,156,213,156,216,156,220,156,223],"svg",{"viewBox":151,"role":152,"ariaLabel":153,"xmlns":154,"style":155},"0 0 720 300","img","Unregistered custom property jumping at the midpoint versus registered angle property interpolating smoothly","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","width:100%;height:auto;max-width:720px;margin:2rem 0","\n  ",[158,159,160],"title",{},"Registered versus unregistered interpolation",[162,163,164],"desc",{},"Two graphs of the angle value over one animation cycle. The unregistered property stays at zero degrees and jumps to 360 degrees halfway through. The registered property rises smoothly from zero to 360 degrees.",[166,167,172],"text",{"textAnchor":168,"x":169,"y":170,"style":171},"middle","360","26","text-anchor:middle;fill:currentColor;font:700 17px sans-serif","Value of --angle over one cycle",[85,174],{"x1":175,"y1":176,"x2":177,"y2":176,"stroke":178,"strokeWidth":179,"opacity":180},"60","240","320","currentColor","1.5","0.6",[85,182],{"x1":175,"y1":175,"x2":175,"y2":176,"stroke":178,"strokeWidth":179,"opacity":180},[184,185],"path",{"d":186,"fill":187,"stroke":188,"strokeWidth":189},"M60 240 H190 V70 H320","none","#7aa2ff","4",[166,191,195],{"textAnchor":168,"x":192,"y":193,"style":194},"190","270","text-anchor:middle;fill:currentColor;font:600 12px sans-serif","unregistered: flips at 50%",[166,197,202],{"textAnchor":198,"x":199,"y":200,"style":201},"end","54","74","text-anchor:end;fill:currentColor;font:11px ui-monospace,monospace","360deg",[166,204,206],{"textAnchor":198,"x":199,"y":205,"style":201},"244","0deg",[85,208],{"x1":209,"y1":176,"x2":210,"y2":176,"stroke":178,"strokeWidth":179,"opacity":180},"420","680",[85,212],{"x1":209,"y1":175,"x2":209,"y2":176,"stroke":178,"strokeWidth":179,"opacity":180},[184,214],{"d":215,"fill":187,"stroke":188,"strokeWidth":189},"M420 240 L680 70",[166,217,219],{"textAnchor":168,"x":218,"y":193,"style":194},"550","registered \u003Cangle>: smooth",[166,221,202],{"textAnchor":198,"x":222,"y":200,"style":201},"414",[166,224,206],{"textAnchor":198,"x":222,"y":205,"style":201},[43,226,228],{"id":227},"the-complete-implementation","The complete implementation",[20,230,231],{},"The card below paints its gradient border with two background layers and a transparent border. Hover or focus the card to set the sweep in motion.",[233,234],"live-demo",{"name":235},"gradient-border-spin",[74,237,241],{"className":238,"code":239,"language":240,"meta":79,"style":79},"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>Animated gradient border\u003C\u002Ftitle>\n\u003Cstyle>\n  body { font: 16px\u002F1.5 system-ui, sans-serif; margin: 2rem; background: #0b1020; color: #e2e8f0; }\n\n  @property --angle {\n    syntax: \"\u003Cangle>\";\n    inherits: false;\n    initial-value: 0deg;\n  }\n\n  .featured {\n    display: block;\n    max-width: 20rem;\n    padding: 1.5rem;\n    border-radius: 16px;\n    color: inherit;\n    text-decoration: none;\n\n    \u002F* A transparent border reserves the ring's width... *\u002F\n    border: 3px solid transparent;\n\n    \u002F* ...and two background layers fill it:\n       1. the card surface, clipped to the PADDING box (inside the border);\n       2. the conic gradient, clipped to the BORDER box (so it shows\n          only through the transparent border ring). *\u002F\n    background:\n      linear-gradient(#111827, #111827) padding-box,\n      conic-gradient(from var(--angle), #22d3ee, #a78bfa, #f472b6, #22d3ee) border-box;\n\n    animation: spin 4s linear infinite;\n    animation-play-state: paused;          \u002F* still until interacted with *\u002F\n  }\n\n  .featured:hover,\n  .featured:focus-visible {\n    animation-play-state: running;\n  }\n\n  \u002F* Keyboard focus also gets a conventional outline, because a moving\n     border alone is not a reliable focus indicator. *\u002F\n  .featured:focus-visible {\n    outline: 2px solid #f8fafc;\n    outline-offset: 4px;\n  }\n\n  @keyframes spin {\n    to { --angle: 360deg; }\n  }\n\n  @media (prefers-reduced-motion: reduce) {\n    .featured { animation: none; }\n  }\n\u003C\u002Fstyle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Ca class=\"featured\" href=\"\u002Fpricing\u002Fteam\u002F\">\n    \u003Cstrong>Team plan\u003C\u002Fstrong>\n    \u003Cp>Most popular for groups of five to fifty.\u003C\u002Fp>\n  \u003C\u002Fa>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n","html",[15,242,243,258,277,286,303,327,341,351,423,430,438,448,454,462,468,473,482,496,511,525,539,552,564,569,576,597,602,608,614,620,626,635,660,706,711,733,750,755,760,768,776,788,793,798,804,810,817,836,850,855,860,871,890,895,900,909,926,931,941,950,960,973,991,1007,1017,1026],{"__ignoreMap":79},[83,244,245,248,251,255],{"class":85,"line":86},[83,246,247],{"class":92},"\u003C!",[83,249,250],{"class":117},"doctype",[83,252,254],{"class":253},"s-5SL"," html",[83,256,257],{"class":92},">\n",[83,259,260,263,265,268,271,275],{"class":85,"line":96},[83,261,262],{"class":92},"\u003C",[83,264,240],{"class":117},[83,266,267],{"class":253}," lang",[83,269,270],{"class":92},"=",[83,272,274],{"class":273},"sT6z2","\"en\"",[83,276,257],{"class":92},[83,278,279,281,284],{"class":85,"line":108},[83,280,262],{"class":92},[83,282,283],{"class":117},"head",[83,285,257],{"class":92},[83,287,288,290,293,296,298,301],{"class":85,"line":114},[83,289,262],{"class":92},[83,291,292],{"class":117},"meta",[83,294,295],{"class":253}," charset",[83,297,270],{"class":92},[83,299,300],{"class":273},"\"utf-8\"",[83,302,257],{"class":92},[83,304,305,307,309,312,314,317,320,322,325],{"class":85,"line":124},[83,306,262],{"class":92},[83,308,292],{"class":117},[83,310,311],{"class":253}," name",[83,313,270],{"class":92},[83,315,316],{"class":273},"\"viewport\"",[83,318,319],{"class":253}," content",[83,321,270],{"class":92},[83,323,324],{"class":273},"\"width=device-width, initial-scale=1\"",[83,326,257],{"class":92},[83,328,330,332,334,337,339],{"class":85,"line":329},6,[83,331,262],{"class":92},[83,333,158],{"class":117},[83,335,336],{"class":92},">Animated gradient border\u003C\u002F",[83,338,158],{"class":117},[83,340,257],{"class":92},[83,342,344,346,349],{"class":85,"line":343},7,[83,345,262],{"class":92},[83,347,348],{"class":117},"style",[83,350,257],{"class":92},[83,352,354,357,360,363,366,369,372,375,377,380,383,386,389,392,394,397,400,402,405,407,410,412,415,417,420],{"class":85,"line":353},8,[83,355,356],{"class":117},"  body",[83,358,359],{"class":92}," { ",[83,361,362],{"class":253},"font",[83,364,365],{"class":92},": ",[83,367,368],{"class":253},"16",[83,370,371],{"class":89},"px",[83,373,374],{"class":92},"\u002F",[83,376,179],{"class":253},[83,378,379],{"class":253}," system-ui",[83,381,382],{"class":92},", ",[83,384,385],{"class":253},"sans-serif",[83,387,388],{"class":92},"; ",[83,390,391],{"class":253},"margin",[83,393,365],{"class":92},[83,395,396],{"class":253},"2",[83,398,399],{"class":89},"rem",[83,401,388],{"class":92},[83,403,404],{"class":253},"background",[83,406,365],{"class":92},[83,408,409],{"class":253},"#0b1020",[83,411,388],{"class":92},[83,413,414],{"class":253},"color",[83,416,365],{"class":92},[83,418,419],{"class":253},"#e2e8f0",[83,421,422],{"class":92},"; }\n",[83,424,426],{"class":85,"line":425},9,[83,427,429],{"emptyLinePlaceholder":428},true,"\n",[83,431,433,436],{"class":85,"line":432},10,[83,434,435],{"class":89},"  @property",[83,437,93],{"class":92},[83,439,441,444,446],{"class":85,"line":440},11,[83,442,443],{"class":92},"    syntax: \"\u003Cangle",[83,445,102],{"class":89},[83,447,105],{"class":92},[83,449,451],{"class":85,"line":450},12,[83,452,453],{"class":92},"    inherits: false;\n",[83,455,457,460],{"class":85,"line":456},13,[83,458,459],{"class":117},"    initial-value",[83,461,121],{"class":92},[83,463,465],{"class":85,"line":464},14,[83,466,467],{"class":92},"  }\n",[83,469,471],{"class":85,"line":470},15,[83,472,429],{"emptyLinePlaceholder":428},[83,474,476,479],{"class":85,"line":475},16,[83,477,478],{"class":253},"  .featured",[83,480,481],{"class":92}," {\n",[83,483,485,488,490,493],{"class":85,"line":484},17,[83,486,487],{"class":253},"    display",[83,489,365],{"class":92},[83,491,492],{"class":253},"block",[83,494,495],{"class":92},";\n",[83,497,499,502,504,507,509],{"class":85,"line":498},18,[83,500,501],{"class":253},"    max-width",[83,503,365],{"class":92},[83,505,506],{"class":253},"20",[83,508,399],{"class":89},[83,510,495],{"class":92},[83,512,514,517,519,521,523],{"class":85,"line":513},19,[83,515,516],{"class":253},"    padding",[83,518,365],{"class":92},[83,520,179],{"class":253},[83,522,399],{"class":89},[83,524,495],{"class":92},[83,526,528,531,533,535,537],{"class":85,"line":527},20,[83,529,530],{"class":253},"    border-radius",[83,532,365],{"class":92},[83,534,368],{"class":253},[83,536,371],{"class":89},[83,538,495],{"class":92},[83,540,542,545,547,550],{"class":85,"line":541},21,[83,543,544],{"class":253},"    color",[83,546,365],{"class":92},[83,548,549],{"class":253},"inherit",[83,551,495],{"class":92},[83,553,555,558,560,562],{"class":85,"line":554},22,[83,556,557],{"class":253},"    text-decoration",[83,559,365],{"class":92},[83,561,187],{"class":253},[83,563,495],{"class":92},[83,565,567],{"class":85,"line":566},23,[83,568,429],{"emptyLinePlaceholder":428},[83,570,572],{"class":85,"line":571},24,[83,573,575],{"class":574},"sLBg1","    \u002F* A transparent border reserves the ring's width... *\u002F\n",[83,577,579,582,584,587,589,592,595],{"class":85,"line":578},25,[83,580,581],{"class":253},"    border",[83,583,365],{"class":92},[83,585,586],{"class":253},"3",[83,588,371],{"class":89},[83,590,591],{"class":253}," solid",[83,593,594],{"class":253}," transparent",[83,596,495],{"class":92},[83,598,600],{"class":85,"line":599},26,[83,601,429],{"emptyLinePlaceholder":428},[83,603,605],{"class":85,"line":604},27,[83,606,607],{"class":574},"    \u002F* ...and two background layers fill it:\n",[83,609,611],{"class":85,"line":610},28,[83,612,613],{"class":574},"       1. the card surface, clipped to the PADDING box (inside the border);\n",[83,615,617],{"class":85,"line":616},29,[83,618,619],{"class":574},"       2. the conic gradient, clipped to the BORDER box (so it shows\n",[83,621,623],{"class":85,"line":622},30,[83,624,625],{"class":574},"          only through the transparent border ring). *\u002F\n",[83,627,629,632],{"class":85,"line":628},31,[83,630,631],{"class":253},"    background",[83,633,634],{"class":92},":\n",[83,636,638,641,644,647,649,651,654,657],{"class":85,"line":637},32,[83,639,640],{"class":253},"      linear-gradient",[83,642,643],{"class":92},"(",[83,645,646],{"class":253},"#111827",[83,648,382],{"class":92},[83,650,646],{"class":253},[83,652,653],{"class":92},") ",[83,655,656],{"class":253},"padding-box",[83,658,659],{"class":92},",\n",[83,661,663,666,668,671,674,676,679,682,685,687,690,692,695,697,699,701,704],{"class":85,"line":662},33,[83,664,665],{"class":253},"      conic-gradient",[83,667,643],{"class":92},[83,669,670],{"class":89},"from",[83,672,673],{"class":253}," var",[83,675,643],{"class":92},[83,677,137],{"class":678},"soyes",[83,680,681],{"class":92},"), ",[83,683,684],{"class":253},"#22d3ee",[83,686,382],{"class":92},[83,688,689],{"class":253},"#a78bfa",[83,691,382],{"class":92},[83,693,694],{"class":253},"#f472b6",[83,696,382],{"class":92},[83,698,684],{"class":253},[83,700,653],{"class":92},[83,702,703],{"class":253},"border-box",[83,705,495],{"class":92},[83,707,709],{"class":85,"line":708},34,[83,710,429],{"emptyLinePlaceholder":428},[83,712,714,717,720,722,725,728,731],{"class":85,"line":713},35,[83,715,716],{"class":253},"    animation",[83,718,719],{"class":92},": spin ",[83,721,189],{"class":253},[83,723,724],{"class":89},"s",[83,726,727],{"class":253}," linear",[83,729,730],{"class":253}," infinite",[83,732,495],{"class":92},[83,734,736,739,741,744,747],{"class":85,"line":735},36,[83,737,738],{"class":253},"    animation-play-state",[83,740,365],{"class":92},[83,742,743],{"class":253},"paused",[83,745,746],{"class":92},";          ",[83,748,749],{"class":574},"\u002F* still until interacted with *\u002F\n",[83,751,753],{"class":85,"line":752},37,[83,754,467],{"class":92},[83,756,758],{"class":85,"line":757},38,[83,759,429],{"emptyLinePlaceholder":428},[83,761,763,766],{"class":85,"line":762},39,[83,764,765],{"class":253},"  .featured:hover",[83,767,659],{"class":92},[83,769,771,774],{"class":85,"line":770},40,[83,772,773],{"class":253},"  .featured:focus-visible",[83,775,481],{"class":92},[83,777,779,781,783,786],{"class":85,"line":778},41,[83,780,738],{"class":253},[83,782,365],{"class":92},[83,784,785],{"class":253},"running",[83,787,495],{"class":92},[83,789,791],{"class":85,"line":790},42,[83,792,467],{"class":92},[83,794,796],{"class":85,"line":795},43,[83,797,429],{"emptyLinePlaceholder":428},[83,799,801],{"class":85,"line":800},44,[83,802,803],{"class":574},"  \u002F* Keyboard focus also gets a conventional outline, because a moving\n",[83,805,807],{"class":85,"line":806},45,[83,808,809],{"class":574},"     border alone is not a reliable focus indicator. *\u002F\n",[83,811,813,815],{"class":85,"line":812},46,[83,814,773],{"class":253},[83,816,481],{"class":92},[83,818,820,823,825,827,829,831,834],{"class":85,"line":819},47,[83,821,822],{"class":253},"    outline",[83,824,365],{"class":92},[83,826,396],{"class":253},[83,828,371],{"class":89},[83,830,591],{"class":253},[83,832,833],{"class":253}," #f8fafc",[83,835,495],{"class":92},[83,837,839,842,844,846,848],{"class":85,"line":838},48,[83,840,841],{"class":253},"    outline-offset",[83,843,365],{"class":92},[83,845,189],{"class":253},[83,847,371],{"class":89},[83,849,495],{"class":92},[83,851,853],{"class":85,"line":852},49,[83,854,467],{"class":92},[83,856,858],{"class":85,"line":857},50,[83,859,429],{"emptyLinePlaceholder":428},[83,861,863,866,869],{"class":85,"line":862},51,[83,864,865],{"class":89},"  @keyframes",[83,867,868],{"class":678}," spin",[83,870,481],{"class":92},[83,872,874,877,879,881,883,885,888],{"class":85,"line":873},52,[83,875,876],{"class":253},"    to",[83,878,359],{"class":92},[83,880,137],{"class":678},[83,882,365],{"class":92},[83,884,169],{"class":253},[83,886,887],{"class":89},"deg",[83,889,422],{"class":92},[83,891,893],{"class":85,"line":892},53,[83,894,467],{"class":92},[83,896,898],{"class":85,"line":897},54,[83,899,429],{"emptyLinePlaceholder":428},[83,901,903,906],{"class":85,"line":902},55,[83,904,905],{"class":89},"  @media",[83,907,908],{"class":92}," (prefers-reduced-motion: reduce) {\n",[83,910,912,915,917,920,922,924],{"class":85,"line":911},56,[83,913,914],{"class":253},"    .featured",[83,916,359],{"class":92},[83,918,919],{"class":253},"animation",[83,921,365],{"class":92},[83,923,187],{"class":253},[83,925,422],{"class":92},[83,927,929],{"class":85,"line":928},57,[83,930,467],{"class":92},[83,932,934,937,939],{"class":85,"line":933},58,[83,935,936],{"class":92},"\u003C\u002F",[83,938,348],{"class":117},[83,940,257],{"class":89},[83,942,944,946,948],{"class":85,"line":943},59,[83,945,936],{"class":92},[83,947,283],{"class":117},[83,949,257],{"class":89},[83,951,953,955,958],{"class":85,"line":952},60,[83,954,262],{"class":92},[83,956,957],{"class":117},"body",[83,959,257],{"class":89},[83,961,963,966,968,971],{"class":85,"line":962},61,[83,964,965],{"class":92},"  \u003C",[83,967,32],{"class":117},[83,969,970],{"class":92}," class=\"featured\" href=\"\u002Fpricing\u002Fteam\u002F\"",[83,972,257],{"class":89},[83,974,976,979,982,984,987,989],{"class":85,"line":975},62,[83,977,978],{"class":92},"    \u003C",[83,980,981],{"class":117},"strong",[83,983,102],{"class":89},[83,985,986],{"class":92},"Team plan\u003C\u002F",[83,988,981],{"class":117},[83,990,257],{"class":89},[83,992,994,996,998,1000,1003,1005],{"class":85,"line":993},63,[83,995,978],{"class":92},[83,997,20],{"class":117},[83,999,102],{"class":89},[83,1001,1002],{"class":92},"Most popular for groups of five to fifty.\u003C\u002F",[83,1004,20],{"class":117},[83,1006,257],{"class":89},[83,1008,1010,1013,1015],{"class":85,"line":1009},64,[83,1011,1012],{"class":92},"  \u003C\u002F",[83,1014,32],{"class":117},[83,1016,257],{"class":89},[83,1018,1020,1022,1024],{"class":85,"line":1019},65,[83,1021,936],{"class":92},[83,1023,957],{"class":117},[83,1025,257],{"class":89},[83,1027,1029,1031,1033],{"class":85,"line":1028},66,[83,1030,936],{"class":92},[83,1032,240],{"class":117},[83,1034,257],{"class":89},[20,1036,1037,1040,1041,1043],{},[15,1038,1039],{},"animation-play-state: paused"," on the base rule and ",[15,1042,785],{}," under interaction means the gradient stays where it was when the pointer leaves, rather than snapping back to zero, which would read as a glitch. If the border should rotate continuously for a \"live\" indicator, drop the paused state — but consider the performance and motion notes below before doing so.",[43,1045,1047],{"id":1046},"the-key-technique-background-clip-layers","The key technique: background-clip layers",[20,1049,1050,1051,1053,1054,1056],{},"The border itself is drawn by a technique that has nothing to do with animation and is worth knowing in its own right. Backgrounds can be clipped to different boxes per layer. The first layer, the card surface, is clipped to ",[15,1052,656],{},", so it stops at the inner edge of the border. The second layer, the gradient, is clipped to ",[15,1055,703],{},", so it extends under the border. Because the border is transparent, the only place the gradient is visible is the ring between the two boxes.",[149,1058,156,1060,156,1063,156,1066,156,1069,156,1076,156,1082,156,1088,156,1092,156,1100,156,1104,156,1107,156,1111,156,1116,156,1122,156,1125],{"viewBox":151,"role":152,"ariaLabel":1059,"xmlns":154,"style":155},"Exploded view of the two background layers: gradient clipped to the border box underneath, solid surface clipped to the padding box on top",[158,1061,1062],{},"Two background layers make the ring",[162,1064,1065],{},"Bottom layer: a gradient filling the whole border box. Top layer: a solid surface filling only the padding box. Seen together through a transparent border, only a ring of gradient remains visible.",[166,1067,1068],{"textAnchor":168,"x":169,"y":170,"style":171},"Surface over gradient, clipped to different boxes",[1070,1071],"rect",{"x":1072,"y":175,"width":1073,"height":1074,"rx":368,"fill":188,"opacity":1075},"40","180","140","0.5",[166,1077,1081],{"textAnchor":168,"x":1078,"y":1079,"style":1080},"130","228","text-anchor:middle;fill:currentColor;font:12px ui-monospace,monospace","gradient · border-box",[166,1083,1087],{"textAnchor":168,"x":1084,"y":1085,"style":1086},"250","136","text-anchor:middle;fill:currentColor;font:700 20px sans-serif","+",[1070,1089],{"x":1090,"y":175,"width":1073,"height":1074,"rx":368,"fill":187,"stroke":178,"strokeDashArray":1091,"opacity":1075},"290",[189,189],[1070,1093],{"x":1094,"y":1095,"width":1096,"height":1097,"rx":1098,"fill":178,"opacity":1099},"296","66","168","128","13","0.2",[166,1101,1103],{"textAnchor":168,"x":1102,"y":1079,"style":1080},"380","surface · padding-box",[166,1105,270],{"textAnchor":168,"x":1106,"y":1085,"style":1086},"500",[1070,1108],{"x":1109,"y":175,"width":1110,"height":1074,"rx":368,"fill":188,"opacity":1075},"530","160",[1070,1112],{"x":1113,"y":1095,"width":1114,"height":1097,"rx":1098,"fill":178,"opacity":1115},"536","148","0.35",[166,1117,1121],{"textAnchor":168,"x":1118,"y":1119,"style":1120},"610","134","text-anchor:middle;fill:currentColor;font:12px sans-serif","card",[166,1123,1124],{"textAnchor":168,"x":1118,"y":1079,"style":1120},"only the ring shows",[166,1126,1129],{"textAnchor":168,"x":169,"y":1127,"style":1128},"276","text-anchor:middle;fill:currentColor;font:12px sans-serif;opacity:0.75","Both layers follow border-radius, so corners stay round.",[20,1131,1132,1133,1135,1136,1139,1140,1142,1143,1146,1147,1150],{},"This is why the approach beats ",[15,1134,29],{},": backgrounds follow ",[15,1137,1138],{},"border-radius",", and ",[15,1141,29],{}," does not. It also means the surface layer must be an ",[62,1144,1145],{},"image"," — ",[15,1148,1149],{},"linear-gradient(#111827, #111827)"," — rather than a plain colour, because only the final background layer can be a bare colour, and it is the gradient that sits last here.",[20,1152,1153,1154,1157,1158,147],{},"The one limitation is transparency. The card surface must be opaque, because it is painted on top of the gradient; a translucent surface would let the gradient show through the whole card. For a see-through card with a gradient ring, use a mask instead: paint the gradient on a pseudo-element and cut out the middle with ",[15,1155,1156],{},"mask-composite: exclude"," over two layers clipped to different boxes — the same composition idea described in ",[32,1159,1161],{"href":1160},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fmask-image-fade-edges\u002F","Fade Edges With mask-image",[43,1163,1165],{"id":1164},"performance-and-motion-considerations","Performance and motion considerations",[20,1167,1168,1169,1171],{},"Each frame of the animation changes ",[15,1170,137],{},", which changes the background image, which requires a repaint of the card's background. That work is small for one card and grows linearly with the number of spinning borders on screen. Three habits keep it in check:",[1173,1174,1175,1182,1188],"ul",{},[1176,1177,1178,1181],"li",{},[981,1179,1180],{},"Animate on interaction, not forever."," The paused-by-default pattern above means at most one card animates at a time.",[1176,1183,1184,1187],{},[981,1185,1186],{},"Keep continuous spinners rare and small."," A single \"live\" badge is fine; a grid of twelve spinning cards is not, and it is visually exhausting too.",[1176,1189,1190,1193,1194,1197],{},[981,1191,1192],{},"Honour reduced motion."," A perpetually rotating border is exactly the kind of non-essential, looping motion that ",[15,1195,1196],{},"prefers-reduced-motion"," users are opting out of. Under WCAG 2.2.2, anything that moves automatically for more than five seconds needs a way to pause it; not animating at all by default avoids the question.",[20,1199,1200,1201,147],{},"A moving border is also not a focus indicator. It can be subtle in some frames and loud in others, and users who have disabled animation see a static border that may not change at all on focus. Always pair it with a real outline, as the example does, following ",[32,1202,1204],{"href":1203},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fcreating-accessible-focus-indicators\u002F","Creating Accessible Focus Indicators",[43,1206,1208],{"id":1207},"theming-the-ring-for-light-and-dark","Theming the ring for light and dark",[20,1210,1211,1212,1214],{},"The example hard-codes a dark card surface, which is the setting where glowing borders look best. On a site with both themes, the surface layer must follow the theme or the card will show a dark panel on a light page. Because the surface is a background ",[62,1213,1145],{}," layer, the cleanest approach is to drive its colour from a custom property that the theme already defines.",[74,1216,1218],{"className":76,"code":1217,"language":78,"meta":79,"style":79},".featured {\n  --surface: #ffffff;\n  background:\n    linear-gradient(var(--surface), var(--surface)) padding-box,\n    conic-gradient(from var(--angle), #0891b2, #7c3aed, #db2777, #0891b2) border-box;\n}\n\n[data-theme=\"dark\"] .featured {\n  --surface: #111827;\n  background:\n    linear-gradient(var(--surface), var(--surface)) padding-box,\n    conic-gradient(from var(--angle), #22d3ee, #a78bfa, #f472b6, #22d3ee) border-box;\n}\n",[15,1219,1220,1227,1239,1246,1276,1316,1320,1324,1344,1354,1360,1386,1422],{"__ignoreMap":79},[83,1221,1222,1225],{"class":85,"line":86},[83,1223,1224],{"class":253},".featured",[83,1226,481],{"class":92},[83,1228,1229,1232,1234,1237],{"class":85,"line":96},[83,1230,1231],{"class":678},"  --surface",[83,1233,365],{"class":92},[83,1235,1236],{"class":253},"#ffffff",[83,1238,495],{"class":92},[83,1240,1241,1244],{"class":85,"line":108},[83,1242,1243],{"class":253},"  background",[83,1245,634],{"class":92},[83,1247,1248,1251,1253,1256,1258,1261,1263,1265,1267,1269,1272,1274],{"class":85,"line":114},[83,1249,1250],{"class":253},"    linear-gradient",[83,1252,643],{"class":92},[83,1254,1255],{"class":253},"var",[83,1257,643],{"class":92},[83,1259,1260],{"class":678},"--surface",[83,1262,681],{"class":92},[83,1264,1255],{"class":253},[83,1266,643],{"class":92},[83,1268,1260],{"class":678},[83,1270,1271],{"class":92},")) ",[83,1273,656],{"class":253},[83,1275,659],{"class":92},[83,1277,1278,1281,1283,1285,1287,1289,1291,1293,1296,1298,1301,1303,1306,1308,1310,1312,1314],{"class":85,"line":124},[83,1279,1280],{"class":253},"    conic-gradient",[83,1282,643],{"class":92},[83,1284,670],{"class":89},[83,1286,673],{"class":253},[83,1288,643],{"class":92},[83,1290,137],{"class":678},[83,1292,681],{"class":92},[83,1294,1295],{"class":253},"#0891b2",[83,1297,382],{"class":92},[83,1299,1300],{"class":253},"#7c3aed",[83,1302,382],{"class":92},[83,1304,1305],{"class":253},"#db2777",[83,1307,382],{"class":92},[83,1309,1295],{"class":253},[83,1311,653],{"class":92},[83,1313,703],{"class":253},[83,1315,495],{"class":92},[83,1317,1318],{"class":85,"line":329},[83,1319,127],{"class":92},[83,1321,1322],{"class":85,"line":343},[83,1323,429],{"emptyLinePlaceholder":428},[83,1325,1326,1329,1332,1334,1337,1340,1342],{"class":85,"line":353},[83,1327,1328],{"class":92},"[",[83,1330,1331],{"class":253},"data-theme",[83,1333,270],{"class":89},[83,1335,1336],{"class":273},"\"dark\"",[83,1338,1339],{"class":92},"] ",[83,1341,1224],{"class":253},[83,1343,481],{"class":92},[83,1345,1346,1348,1350,1352],{"class":85,"line":425},[83,1347,1231],{"class":678},[83,1349,365],{"class":92},[83,1351,646],{"class":253},[83,1353,495],{"class":92},[83,1355,1356,1358],{"class":85,"line":432},[83,1357,1243],{"class":253},[83,1359,634],{"class":92},[83,1361,1362,1364,1366,1368,1370,1372,1374,1376,1378,1380,1382,1384],{"class":85,"line":440},[83,1363,1250],{"class":253},[83,1365,643],{"class":92},[83,1367,1255],{"class":253},[83,1369,643],{"class":92},[83,1371,1260],{"class":678},[83,1373,681],{"class":92},[83,1375,1255],{"class":253},[83,1377,643],{"class":92},[83,1379,1260],{"class":678},[83,1381,1271],{"class":92},[83,1383,656],{"class":253},[83,1385,659],{"class":92},[83,1387,1388,1390,1392,1394,1396,1398,1400,1402,1404,1406,1408,1410,1412,1414,1416,1418,1420],{"class":85,"line":450},[83,1389,1280],{"class":253},[83,1391,643],{"class":92},[83,1393,670],{"class":89},[83,1395,673],{"class":253},[83,1397,643],{"class":92},[83,1399,137],{"class":678},[83,1401,681],{"class":92},[83,1403,684],{"class":253},[83,1405,382],{"class":92},[83,1407,689],{"class":253},[83,1409,382],{"class":92},[83,1411,694],{"class":253},[83,1413,382],{"class":92},[83,1415,684],{"class":253},[83,1417,653],{"class":92},[83,1419,703],{"class":253},[83,1421,495],{"class":92},[83,1423,1424],{"class":85,"line":456},[83,1425,127],{"class":92},[20,1427,1428,1429,1432],{},"Note that the gradient colours change between themes as well. Pastel stops that glow against a dark surface nearly vanish against white, and the ring is the element's main affordance, so it must meet the 3:1 non-text contrast guideline of WCAG 1.4.11 against the page in both themes. Deeper, more saturated stops for the light theme keep the ring visible. Check contrast at the ",[62,1430,1431],{},"dimmest"," point of the gradient, not the brightest, because a rotating ring spends time at every angle.",[43,1434,1436],{"id":1435},"variation-a-travelling-highlight-instead-of-a-full-spin","Variation: a travelling highlight instead of a full spin",[20,1438,1439],{},"A full rainbow sweep suits a playful brand. A calmer variant keeps the border mostly neutral and sends a short bright segment around it, like light catching an edge.",[74,1441,1443],{"className":76,"code":1442,"language":78,"meta":79,"style":79},".subtle {\n  border: 2px solid transparent;\n  background:\n    linear-gradient(#111827, #111827) padding-box,\n    conic-gradient(\n      from var(--angle),\n      #334155 0deg,\n      #334155 300deg,\n      #93c5fd 330deg,     \u002F* the bright segment *\u002F\n      #334155 360deg\n    ) border-box;\n  animation: spin 6s linear infinite paused;\n}\n\n.subtle:hover,\n.subtle:focus-visible { animation-play-state: running; }\n",[15,1444,1445,1452,1469,1475,1493,1500,1514,1526,1537,1553,1563,1572,1593,1597,1601,1608],{"__ignoreMap":79},[83,1446,1447,1450],{"class":85,"line":86},[83,1448,1449],{"class":253},".subtle",[83,1451,481],{"class":92},[83,1453,1454,1457,1459,1461,1463,1465,1467],{"class":85,"line":96},[83,1455,1456],{"class":253},"  border",[83,1458,365],{"class":92},[83,1460,396],{"class":253},[83,1462,371],{"class":89},[83,1464,591],{"class":253},[83,1466,594],{"class":253},[83,1468,495],{"class":92},[83,1470,1471,1473],{"class":85,"line":108},[83,1472,1243],{"class":253},[83,1474,634],{"class":92},[83,1476,1477,1479,1481,1483,1485,1487,1489,1491],{"class":85,"line":114},[83,1478,1250],{"class":253},[83,1480,643],{"class":92},[83,1482,646],{"class":253},[83,1484,382],{"class":92},[83,1486,646],{"class":253},[83,1488,653],{"class":92},[83,1490,656],{"class":253},[83,1492,659],{"class":92},[83,1494,1495,1497],{"class":85,"line":124},[83,1496,1280],{"class":253},[83,1498,1499],{"class":92},"(\n",[83,1501,1502,1505,1507,1509,1511],{"class":85,"line":329},[83,1503,1504],{"class":89},"      from",[83,1506,673],{"class":253},[83,1508,643],{"class":92},[83,1510,137],{"class":678},[83,1512,1513],{"class":92},"),\n",[83,1515,1516,1519,1522,1524],{"class":85,"line":343},[83,1517,1518],{"class":253},"      #334155",[83,1520,1521],{"class":253}," 0",[83,1523,887],{"class":89},[83,1525,659],{"class":92},[83,1527,1528,1530,1533,1535],{"class":85,"line":353},[83,1529,1518],{"class":253},[83,1531,1532],{"class":253}," 300",[83,1534,887],{"class":89},[83,1536,659],{"class":92},[83,1538,1539,1542,1545,1547,1550],{"class":85,"line":425},[83,1540,1541],{"class":253},"      #93c5fd",[83,1543,1544],{"class":253}," 330",[83,1546,887],{"class":89},[83,1548,1549],{"class":92},",     ",[83,1551,1552],{"class":574},"\u002F* the bright segment *\u002F\n",[83,1554,1555,1557,1560],{"class":85,"line":432},[83,1556,1518],{"class":253},[83,1558,1559],{"class":253}," 360",[83,1561,1562],{"class":89},"deg\n",[83,1564,1565,1568,1570],{"class":85,"line":440},[83,1566,1567],{"class":92},"    ) ",[83,1569,703],{"class":253},[83,1571,495],{"class":92},[83,1573,1574,1577,1579,1582,1584,1586,1588,1591],{"class":85,"line":450},[83,1575,1576],{"class":253},"  animation",[83,1578,719],{"class":92},[83,1580,1581],{"class":253},"6",[83,1583,724],{"class":89},[83,1585,727],{"class":253},[83,1587,730],{"class":253},[83,1589,1590],{"class":253}," paused",[83,1592,495],{"class":92},[83,1594,1595],{"class":85,"line":456},[83,1596,127],{"class":92},[83,1598,1599],{"class":85,"line":464},[83,1600,429],{"emptyLinePlaceholder":428},[83,1602,1603,1606],{"class":85,"line":470},[83,1604,1605],{"class":253},".subtle:hover",[83,1607,659],{"class":92},[83,1609,1610,1613,1615,1618,1620,1622],{"class":85,"line":475},[83,1611,1612],{"class":253},".subtle:focus-visible",[83,1614,359],{"class":92},[83,1616,1617],{"class":253},"animation-play-state",[83,1619,365],{"class":92},[83,1621,785],{"class":253},[83,1623,422],{"class":92},[20,1625,1626],{},"Because the gradient is mostly a single colour, the rotation is visible only as the highlight travelling around the edge. Slowing the cycle to six seconds makes it feel ambient rather than urgent.",[43,1628,1630],{"id":1629},"browser-support","Browser support",[20,1632,1633,1635,1636,1638,1639,1641,1642,1645,1646,1648],{},[15,1634,17],{}," is supported in Chrome and Edge 85+, Firefox 128+ and Safari 16.4+. In browsers without it, ",[15,1637,137],{}," is unregistered: the border still renders with its initial gradient, it simply does not rotate — an acceptable fallback. ",[15,1640,52],{}," and per-layer ",[15,1643,1644],{},"background-clip"," are supported in all current engines. ",[15,1647,1196],{}," is supported in Chrome 74+, Edge 79+, Firefox 63+ and Safari 10.1+.",[43,1650,1652],{"id":1651},"faq","FAQ",[20,1654,1655,1658,1659,1661,1662,1665],{},[981,1656,1657],{},"Why does my conic-gradient border not animate?","\nBecause the angle lives in an unregistered custom property. The browser treats an unregistered property as an untyped token list and cannot interpolate it, so the value jumps at the end of the animation. Register it with ",[15,1660,17],{}," and ",[15,1663,1664],{},"syntax: \"\u003Cangle>\""," and it animates smoothly.",[20,1667,1668,1674,1676,1677,1679,1680,1682],{},[981,1669,1670,1671,1673],{},"Can ",[15,1672,29],{}," be used for an animated gradient border?",[15,1675,29],{}," can display a gradient border, but it ignores ",[15,1678,1138],{},", so rounded cards get square gradient corners. The background-layer technique on this page respects ",[15,1681,1138],{}," and works with any gradient.",[20,1684,1685,1688],{},[981,1686,1687],{},"Is a spinning border bad for performance?","\nThe angle change repaints the gradient each frame, which is cheap for a single small card and noticeable if dozens run at once. Limit it to one highlighted element, pause it off screen or when not hovered, and never run it for users who prefer reduced motion.",[20,1690,1691,1694,1695,1697,1698,1700,1701,1661,1704,1707],{},[981,1692,1693],{},"How do I make the border only animate on hover or focus?","\nDeclare the animation on the element but set ",[15,1696,1039],{},", then switch it to ",[15,1699,785],{}," under ",[15,1702,1703],{},":hover",[15,1705,1706],{},":focus-visible",". The border keeps its position between hovers instead of snapping back to zero.",[43,1709,1711],{"id":1710},"related","Related",[1173,1713,1714,1719,1726,1733],{},[1176,1715,1716,1718],{},[32,1717,35],{"href":34}," — the parent guide.",[1176,1720,1721,1725],{},[32,1722,1724],{"href":1723},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fregistered-properties-and-type-safety\u002F","Registered Properties and Type Safety"," — what the syntax descriptor guarantees.",[1176,1727,1728,1732],{},[32,1729,1731],{"href":1730},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fsmooth-hover-effects-without-javascript\u002F","Smooth Hover Effects Without JavaScript"," — other hover treatments for cards.",[1176,1734,1735,1743],{},[32,1736,1738,1739,1742],{"href":1737},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fcontent-aware-card-layouts-with-has\u002F","Content-Aware Card Layouts With ",[1740,1741],"has",{},"()"," — highlighting a card based on what it contains.",[348,1745,1746],{},"html pre.shiki code .sHUrx, html code.shiki .sHUrx{--shiki-default:#A0111F;--shiki-dark:#FF9492}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 .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s-5SL, html code.shiki .s-5SL{--shiki-default:#023B95;--shiki-dark:#91CBFF}html pre.shiki code .sT6z2, html code.shiki .sT6z2{--shiki-default:#032563;--shiki-dark:#ADDCFF}html pre.shiki code .sLBg1, html code.shiki .sLBg1{--shiki-default:#66707B;--shiki-dark:#BDC4CC}html pre.shiki code .soyes, html code.shiki .soyes{--shiki-default:#702C00;--shiki-dark:#FFB757}",{"title":79,"searchDepth":96,"depth":96,"links":1748},[1749,1750,1751,1752,1753,1754,1755,1756,1757],{"id":45,"depth":96,"text":46},{"id":227,"depth":96,"text":228},{"id":1046,"depth":96,"text":1047},{"id":1164,"depth":96,"text":1165},{"id":1207,"depth":96,"text":1208},{"id":1435,"depth":96,"text":1436},{"id":1629,"depth":96,"text":1630},{"id":1651,"depth":96,"text":1652},{"id":1710,"depth":96,"text":1711},"Spin a conic-gradient border around a card with a registered angle property, keep it crisp with border-box masking, and stop it cleanly for reduced motion.","md",{"pageTitle":1761,"datePublished":1762,"dateModified":1762,"faq":1763},"Animated Gradient Borders With @property","2026-09-18",[1764,1766,1769,1771],{"q":1657,"a":1765},"Because the angle lives in an unregistered custom property. The browser treats an unregistered property as an untyped token list and cannot interpolate it, so the value jumps at the end of the animation. Register it with @property and syntax \"\u003Cangle>\" and it animates smoothly.",{"q":1767,"a":1768},"Can border-image be used for an animated gradient border?","border-image can display a gradient border, but it ignores border-radius, so rounded cards get square gradient corners. The background-layer technique on this page respects border-radius and works with any gradient.",{"q":1687,"a":1770},"The angle change repaints the gradient each frame, which is cheap for a single small card and noticeable if dozens run at once. Limit it to one highlighted element, pause it off screen or when not hovered, and never run it for users who prefer reduced motion.",{"q":1693,"a":1772},"Declare the animation on the element but set animation-play-state: paused, then switch it to running under :hover and :focus-visible. The border keeps its position between hovers instead of snapping back to zero.","\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fanimated-gradient-borders-with-property",{"title":5,"description":1758},"css-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fanimated-gradient-borders-with-property\u002Findex","t7g4jBePoL_2x1pVIl8D5B6AOdWJsQtCMR6VObnrrIA",[1778,1781,1784,1787,1790,1793,1796,1799,1802,1805,1808,1809,1812,1815,1818,1821,1824,1827,1830,1833,1836,1839,1842,1845,1848,1851,1854,1857,1860,1863,1866,1869,1872,1875,1878,1881,1884,1887,1890,1893,1896,1899,1902,1905,1908,1911,1914,1917,1920,1923,1926,1929,1932,1935,1938,1941,1944,1947,1950,1953,1956,1959,1962,1965,1968,1971,1974,1977,1980,1983,1986,1989,1992,1995,1998,2001,2004,2007,2010,2013,2016,2019,2022,2025,2028,2031,2034,2037,2040,2043,2046,2049,2052,2055,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,2240,2243,2246,2249,2252,2255,2258,2261,2264,2267,2270,2273,2276,2279,2282,2285,2288,2291,2294,2297,2300,2303,2306,2309,2312,2315,2318,2321,2324,2327,2330,2333],{"path":1779,"title":1780},"\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":1782,"title":1783},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fflashing-content-and-seizure-thresholds","Flashing Content and Seizure Thresholds",{"path":1785,"title":1786},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fforced-colors-mode-and-animations","Forced Colors Mode and Animations",{"path":1788,"title":1789},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations","Accessibility in CSS Animations: Patterns, Specs & Best Practices",{"path":1791,"title":1792},"\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":1794,"title":1795},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fprefers-reduced-motion-recipes","prefers-reduced-motion Recipes: A Reduction for Every Common Effect",{"path":1797,"title":1798},"\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":1800,"title":1801},"\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":1803,"title":1804},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fvestibular-safe-animation-patterns","Vestibular-Safe Animation Patterns: Why Some Motion Makes People Sick",{"path":1806,"title":1807},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fwcag-motion-success-criteria","WCAG Motion Success Criteria: What Each One Actually Requires",{"path":1773,"title":5},{"path":1810,"title":1811},"\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":1813,"title":1814},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations","Clip-Path & Mask Animations: Animating Visibility Instead of Position",{"path":1816,"title":1817},"\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":1819,"title":1820},"\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":1822,"title":1823},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fanimating-gradients","Animating CSS Gradients: Smooth Colour Motion Without Jumps",{"path":1825,"title":1826},"\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":1828,"title":1829},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions","Color & Theme Transitions: Colour as Part of the Motion System",{"path":1831,"title":1832},"\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":1834,"title":1835},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fsmooth-theme-switching-transitions","Smooth Theme Switching: Crossfades, Circular Reveals and No Flash",{"path":1837,"title":1838},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fcontainer-query-hover-affordances","Container Query Hover Affordances: When Narrow Means Persistent, Not Hidden",{"path":1840,"title":1841},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion","Container-Aware Motion: Animation Sized by the Space a Component Actually Has",{"path":1843,"title":1844},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Flayout-change-animations-at-container-breakpoints","Animating Changes at Container Breakpoints",{"path":1846,"title":1847},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fmotion-driven-by-container-style-queries","Motion Driven by Container Style Queries",{"path":1849,"title":1850},"\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":1852,"title":1853},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fsuppressing-motion-in-small-containers","Suppressing Motion in Small Containers: Deliberately Animating Nothing",{"path":1855,"title":1856},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fcontrolling-css-animations-from-javascript","Controlling CSS Animations From JavaScript",{"path":1858,"title":1859},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api","CSS Animation vs the Web Animations API: A Decision Guide",{"path":1861,"title":1862},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fwaapi-vs-css-for-interruptible-ui","Interruptible UI: CSS Transitions vs WAAPI",{"path":1864,"title":1865},"\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":1867,"title":1868},"\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":1870,"title":1871},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fcustom-property-fallbacks-and-invalid-values","Custom Property Fallbacks and Invalid Values",{"path":1873,"title":1874},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Ffluid-spacing-tokens-driving-transition-durations","Fluid Spacing Tokens That Drive Transition Durations",{"path":1876,"title":1877},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture","CSS Custom Properties Architecture: Scalable Design Systems & Dynamic UI",{"path":1879,"title":1880},"\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":1882,"title":1883},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fscoping-custom-properties-to-components","Scoping Custom Properties to Components",{"path":1885,"title":1886},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fcss-transition-timing-functions","CSS Transition Timing Functions: ease, cubic-bezier(), steps() and linear()",{"path":1888,"title":1889},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals","CSS Transition Fundamentals: Architecture, Performance & Patterns",{"path":1891,"title":1892},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Finterrupted-and-reversing-transitions","Interrupted and Reversing Transitions: What Happens Mid-Flight",{"path":1894,"title":1895},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fstarting-style-entry-animations","@starting-style: Animating an Element's Very First Style Change",{"path":1897,"title":1898},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-delay-choreography","Choreographing Motion With transition-delay",{"path":1900,"title":1901},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-shorthand-and-multiple-properties","The transition Shorthand and Multiple Properties",{"path":1903,"title":1904},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransitioning-display-with-allow-discrete","Transitioning display with transition-behavior: allow-discrete and @starting-style",{"path":1906,"title":1907},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fanimating-dialog-open-and-close","Animating \u003Cdialog> Open and Close: Both Directions, No Library",{"path":1909,"title":1910},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fbackdrop-animations","Animating ::backdrop: Fades and Blurs Behind Dialogs and Popovers",{"path":1912,"title":1913},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations","Dialog & Popover Animations: Motion for the Top Layer",{"path":1915,"title":1916},"\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":1918,"title":1919},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fpopover-entry-and-exit-transitions","Popover Menus That Animate From Their Anchor",{"path":1921,"title":1922},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fchoosing-animation-durations","Choosing Animation Durations: How Long Motion Should Last",{"path":1924,"title":1925},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fcubic-bezier-overshoot-and-anticipation","Overshoot and Anticipation With cubic-bezier(): Motion With Character",{"path":1927,"title":1928},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fentry-vs-exit-easing","Entry vs Exit Easing: Different Curves for Arriving and Leaving",{"path":1930,"title":1931},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design","Easing & Motion Design: Making CSS Motion Feel Intentional",{"path":1933,"title":1934},"\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":1936,"title":1937},"\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":1939,"title":1940},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Faccessible-css-only-tooltips","Accessible CSS-Only Tooltips and Hover Cards With  and ",{"path":1942,"title":1943},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fbutton-press-and-active-states","Button Press and  States",{"path":1945,"title":1946},"\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":1948,"title":1949},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Ffocus-within-form-patterns"," Form Patterns: Styling a Group From the Field Inside It",{"path":1951,"title":1952},"\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":1954,"title":1955},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design","Hover & Focus State Design: Spec-Compliant Patterns for Modern UIs",{"path":1957,"title":1958},"\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":1960,"title":1961},"\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":1963,"title":1964},"\u002Fcss-only-micro-interactions-animations","CSS-Only Micro-Interactions & Animations: Architecture, Performance & Implementation",{"path":1966,"title":1967},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fanimation-composition-and-stacking","Stacking Animations With animation-composition",{"path":1969,"title":1970},"\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":1972,"title":1973},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcontainer-query-triggered-keyframe-animations","Container-Query-Triggered Keyframe Animations: Animate Differently per Available Space",{"path":1975,"title":1976},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-accordions-and-disclosure","CSS-Only Accordions and Disclosure Widgets with details and summary",{"path":1978,"title":1979},"\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":1981,"title":1982},"\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":1984,"title":1985},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns","Keyframe Animation Patterns: Spec-Compliant Architectures for Modern UIs",{"path":1987,"title":1988},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fmulti-step-keyframes-and-per-keyframe-easing","Multi-Step Keyframes and Per-Keyframe Easing",{"path":1990,"title":1991},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fstaggered-list-animations-with-custom-properties","Staggered List Animations Using --i Index Custom Properties",{"path":1993,"title":1994},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fanimating-box-shadow-and-filters-cheaply","Animating box-shadow and Filters Cheaply",{"path":1996,"title":1997},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcontain-property-for-animation-performance","The contain Property for Animation Performance",{"path":1999,"title":2000},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcss-triggers-layout-paint-composite","Layout, Paint and Composite: What Triggers What",{"path":2002,"title":2003},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration","Performance & GPU Acceleration in CSS: A Developer’s Blueprint",{"path":2005,"title":2006},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Foptimizing-css-animations-for-60fps","Optimizing CSS Animations for 60fps: Budgeting the Frame",{"path":2008,"title":2009},"\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":2011,"title":2012},"\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":2014,"title":2015},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations","Scroll-Driven Animations: Binding Motion to Scroll Position in Pure CSS",{"path":2017,"title":2018},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-animation-fallbacks","Shipping Scroll-Driven Animations Without Breaking Anything",{"path":2020,"title":2021},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-parallax-effects","Scroll-Driven Parallax Effects in CSS",{"path":2023,"title":2024},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-progress-bar-without-javascript","A Reading Progress Bar Driven by scroll(root)",{"path":2026,"title":2027},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-triggered-reveal-animations","Reveal-on-Scroll with view() and animation-range",{"path":2029,"title":2030},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Ftimeline-scope-for-cross-element-animations","timeline-scope for Cross-Element Animations",{"path":2032,"title":2033},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fview-timeline-and-animation-range","View Timelines and animation-range",{"path":2035,"title":2036},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fcross-document-view-transitions","Cross-Document View Transitions",{"path":2038,"title":2039},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers","View Transitions for CSS Developers: the Pseudo-Element Tree, Snapshots, and Named Elements",{"path":2041,"title":2042},"\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":2044,"title":2045},"\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":2047,"title":2048},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transition-types-and-classes","View Transition Types and Classes",{"path":2050,"title":2051},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-for-list-reordering","View Transitions for List Reordering",{"path":2053,"title":2054},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-with-reduced-motion","Honouring prefers-reduced-motion in View Transitions",{"path":374,"title":2056},"Modern CSS Layouts & Micro-Interactions",{"path":2058,"title":2059},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioned-tooltips","Anchor-Positioned Tooltips: Tethering, Flipping, and Getting the Semantics Right",{"path":2061,"title":2062},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioning-fallbacks","Anchor Positioning Fallbacks: A Graceful Floor for Older Browser Versions",{"path":2064,"title":2065},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-size-for-matching-widths","anchor-size(): Overlays That Match Their Trigger's Size",{"path":2067,"title":2068},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays","CSS Anchor Positioning and Overlays: Tethering Elements Without JavaScript",{"path":2070,"title":2071},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-attribute-and-css-styling","The popover Attribute: Top-Layer Overlays With No JavaScript",{"path":2073,"title":2074},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-light-dismiss-and-stacking","Popover Light Dismiss, Nesting and Stacking",{"path":2076,"title":2077},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fposition-area-grid-explained","position-area: The Anchor Placement Grid",{"path":2079,"title":2080},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fcontainer-query-polyfill-tradeoffs","Container Query Polyfills: What They Cost and When to Skip Them",{"path":2082,"title":2083},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ffeature-detection-with-supports","Feature Detection with @supports: Syntax, Semantics, and the Traps",{"path":2085,"title":2086},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fhandling-container-query-fallbacks-for-older-browsers","Handling Container Query Fallbacks for Older Browsers",{"path":2088,"title":2089},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks","Container Query Fallbacks: Spec-Compliant CSS Strategies for Legacy Browsers",{"path":2091,"title":2092},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fintrinsic-layout-fallbacks-without-queries","Intrinsic Layout Fallbacks: Baselines That Adapt Without Any Query",{"path":2094,"title":2095},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ftesting-fallbacks-without-old-browsers","Testing CSS Fallbacks Without an Old Browser",{"path":2097,"title":2098},"\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":2100,"title":2101},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-query-range-and-logic-operators","Container Query Range Syntax and Logic Operators",{"path":2103,"title":2104},"\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":2106,"title":2107},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-type-size-vs-inline-size","Choosing container-type: inline-size, size, or normal",{"path":2109,"title":2110},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-vs-media-queries-comparison","Container vs Media Queries: Choosing the Right Reference Box",{"path":2112,"title":2113},"\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":2115,"title":2116},"\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":2118,"title":2119},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics","Container Query Syntax Basics",{"path":2121,"title":2122},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fnesting-and-naming-container-queries","Nesting and Naming Container Queries: Targeting the Right Ancestor",{"path":2124,"title":2125},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fauto-fit-minmax-responsive-grids","Responsive Grids with repeat(auto-fit, minmax())",{"path":2127,"title":2128},"\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":2130,"title":2131},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fgrid-auto-flow-dense-packing","grid-auto-flow: dense for Packed Layouts",{"path":2133,"title":2134},"\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":2136,"title":2137},"\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":2139,"title":2140},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts","CSS Grid and Subgrid Layouts for Responsive Interfaces",{"path":2142,"title":2143},"\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":2145,"title":2146},"\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":2148,"title":2149},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fsubgrid-vs-nested-grid","Subgrid vs an Independently Nested Grid",{"path":2151,"title":2152},"\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":2154,"title":2155},"\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":2157,"title":2158},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-grow-and-flex-shrink-explained","flex-grow and flex-shrink Explained",{"path":2160,"title":2161},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-wrap-intrinsic-responsive-rows","Breakpoint-Free Responsive Rows With flex-wrap and flex-basis",{"path":2163,"title":2164},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflexbox-gap-and-spacing","Flexbox gap vs Margins: Spacing Items Without Edge Hacks",{"path":2166,"title":2167},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns","Flexbox Layout Patterns: One-Dimensional Layout for Real Components",{"path":2169,"title":2170},"\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":2172,"title":2173},"\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":2175,"title":2176},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fdebugging-clamp-values","Debugging clamp(): Values That Are Ignored, Stuck or Never Fluid",{"path":2178,"title":2179},"\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":2181,"title":2182},"\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":2184,"title":2185},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-type-accessibility-and-zoom","Fluid Type, Accessibility and Zoom: The vw-Only Trap",{"path":2187,"title":2188},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-typography-without-javascript","Fluid Typography Without JavaScript: A Precision CSS Reference",{"path":2190,"title":2191},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp","Fluid Typography with clamp(): A Practical Guide for Modern CSS",{"path":2193,"title":2194},"\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":2196,"title":2197},"\u002Fmastering-container-queries-responsive-layouts","Mastering Container Queries & Responsive Layouts",{"path":2199,"title":2200},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Faspect-ratio-for-responsive-media","Using aspect-ratio for Responsive Media and Preventing Layout Shift",{"path":2202,"title":2203},"\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":2205,"title":2206},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques","Intrinsic Sizing Techniques: Modern CSS Layouts for Responsive UI",{"path":2208,"title":2209},"\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":2211,"title":2212},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fmin-max-fit-content-explained","min-content, max-content, and fit-content() Explained",{"path":2214,"title":2215},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fobject-fit-and-object-position","object-fit and object-position: Images That Fit Any Box",{"path":2217,"title":2218},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fpreventing-flex-and-grid-overflow","The min-width: auto Trap in Flex and Grid Layouts",{"path":2220,"title":2221},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-for-reset-and-tokens","Cascade Layers for Reset and Design Tokens",{"path":2223,"title":2224},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-vs-specificity-hacks","Cascade Layers vs Specificity Hacks: Ordering Instead of Escalating",{"path":2226,"title":2227},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcss-scope-for-component-styles","@scope for Component Styles: Short Selectors That Cannot Leak",{"path":2229,"title":2230},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies","Modern CSS Reset Strategies: A Spec-Compliant Foundation",{"path":2232,"title":2233},"\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":2235,"title":2236},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fwriting-a-minimal-modern-reset","Writing a Minimal Modern CSS Reset: Every Line Justified",{"path":2238,"title":2239},"\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":2241,"title":2242},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fempty-and-loading-states-with-has","Empty and Loading States With ()",{"path":2244,"title":2245},"\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":2247,"title":2248},"\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":2250,"title":2251},"\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":2253,"title":2254},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has","Parent-Aware Layouts With :has(): Letting Containers React to Their Contents",{"path":2256,"title":2257},"\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":2259,"title":2260},"\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":2262,"title":2263},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-data-tables","Container Query Data Tables: Reflowing Tables to Cards",{"path":2265,"title":2266},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-sidebar-layouts","Container Query Sidebar Layouts That Travel Between Contexts",{"path":2268,"title":2269},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns","Responsive Component Patterns: Architecture & Implementation",{"path":2271,"title":2272},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-forms-with-container-queries","Responsive Forms with Container Queries: Reflow Without Losing the Wiring",{"path":2274,"title":2275},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-hero-sections-with-container-queries","Responsive Hero Sections With Container Queries",{"path":2277,"title":2278},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-navigation-without-media-queries","Responsive Navigation Without Media Queries Using Container Queries",{"path":2280,"title":2281},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-pricing-tables","Responsive Pricing Tables: Aligned Features, a Clear Recommendation, Any Width",{"path":2283,"title":2284},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Ftabs-that-become-accordions","Tabs That Become an Accordion: One Component, Two Layouts",{"path":2286,"title":2287},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fcss-only-carousel-with-scroll-snap","A CSS-Only Carousel With Scroll Snap",{"path":2289,"title":2290},"\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":2292,"title":2293},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts","Scroll Snap & Overflow Layouts: Designing Components That Scroll on Purpose",{"path":2295,"title":2296},"\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":2298,"title":2299},"\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":2301,"title":2302},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fcombining-size-and-style-queries","Combining Size and Style Container Queries",{"path":2304,"title":2305},"\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":2307,"title":2308},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state","Style Queries and Container State: Token-Driven Component Variants",{"path":2310,"title":2311},"\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":2313,"title":2314},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fstyle-query-component-variants","Component Variants With Style Queries: One Token, Many Looks",{"path":2316,"title":2317},"\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":2319,"title":2320},"\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":2322,"title":2323},"\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":2325,"title":2326},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout","Viewport Units & Mobile Layout: Designing for the Screen You Actually Get",{"path":2328,"title":2329},"\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":2331,"title":2332},"\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":2334,"title":2335},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Fvirtual-keyboard-and-interactive-widget","Layouts That Survive the Virtual Keyboard",{"title":2337,"caption":2338,"height":2339,"html":2340,"css":2341},"Conic-gradient border driven by a registered angle","Hover or Tab to the card: the gradient sweeps around the rounded border, and pauses where it is when you leave.",220,"\n\u003Ca class=\"featured\" href=\"#\">\n  \u003Cstrong>Team plan\u003C\u002Fstrong>\n  \u003Cp>Most popular for groups of five to fifty.\u003C\u002Fp>\n\u003C\u002Fa>","\nbody { background: #0b1020; color: #e2e8f0; }\n@property --angle { syntax: \"\u003Cangle>\"; inherits: false; initial-value: 0deg; }\n.featured {\n  display: block;\n  max-width: 20rem;\n  padding: 1.5rem;\n  border-radius: 16px;\n  color: inherit;\n  text-decoration: none;\n  border: 3px solid transparent;\n  background:\n    linear-gradient(#111827, #111827) padding-box,\n    conic-gradient(from var(--angle), #22d3ee, #a78bfa, #f472b6, #22d3ee) border-box;\n  animation: spin 4s linear infinite;\n  animation-play-state: paused;\n}\n.featured p { margin: 0.4rem 0 0; }\n.featured:hover, .featured:focus-visible { animation-play-state: running; }\n.featured:focus-visible { outline: 2px solid #f8fafc; outline-offset: 4px; }\n@keyframes spin { to { --angle: 360deg; } }\n@media (prefers-reduced-motion: reduce) { .featured { animation: none; } }",1789717749260]