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