[{"data":1,"prerenderedAt":2131},["ShallowReactive",2],{"page-\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-light-dismiss-and-stacking":3,"content-all-pages":1567,"live-demo:popover-nested-menu":2125},{"id":4,"title":5,"body":6,"description":1550,"extension":1551,"meta":1552,"navigation":391,"path":1563,"seo":1564,"stem":1565,"__hash__":1566},"content\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-light-dismiss-and-stacking\u002Findex.md","Popover Light Dismiss, Nesting and Stacking",{"type":7,"value":8,"toc":1538},"minimark",[9,13,33,38,46,49,53,167,196,200,203,207,1151,1162,1166,1173,1236,1239,1249,1253,1265,1371,1387,1391,1398,1410,1414,1424,1437,1441,1458,1462,1474,1480,1494,1503,1507,1535],[10,11,5],"h1",{"id":12},"popover-light-dismiss-nesting-and-stacking",[14,15,16,17,21,22,27,28,32],"p",{},"The HTML ",[18,19,20],"code",{},"popover"," attribute gives overlays a lot of behaviour for free: they render in the top layer above everything, open and close from buttons without script, and close when the user clicks elsewhere or presses Escape. Most tutorials stop at a single popover. Real interfaces have several: a menu with a submenu, a tooltip inside a menu, a toast that should survive a click elsewhere, a settings panel that must not close when a date picker opens inside it. How popovers interact — which ones close when another opens, what order they stack in, where focus goes — is governed by a small set of rules. This page lays them out and shows how to build nested and coexisting overlays that behave predictably. It belongs to ",[23,24,26],"a",{"href":25},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002F","Anchor Positioning & Overlays"," in the ",[23,29,31],{"href":30},"\u002Fmastering-container-queries-responsive-layouts\u002F","Mastering Container Queries & Responsive Layouts"," guide.",[34,35,37],"h2",{"id":36},"why-popovers-need-rules-for-each-other","Why popovers need rules for each other",[14,39,40,41,45],{},"A single dropdown is simple: open it, click outside, it closes. Two dropdowns raise questions. Opening the second should usually close the first — two open menus at once is confusing. But a submenu opening from inside a menu must ",[42,43,44],"em",{},"not"," close its parent. A notification must not vanish because the user clicked a menu. And whichever is open most recently should be on top.",[14,47,48],{},"Before the popover API, every overlay library answered these questions differently, and mixing libraries produced overlays that fought: a date picker inside a modal closing the modal, two dropdowns open at once, a tooltip stranded behind a menu. The popover API standardises the answers so native overlays from different sources cooperate.",[34,50,52],{"id":51},"the-three-popover-types","The three popover types",[54,55,61,62,61,66,61,70,61,78,61,88,61,94,61,97,61,101,61,104,61,108,61,115,61,119,61,122,61,125,61,129,61,131,61,134,61,137,61,141,61,144,61,147,61,150,61,159,61,163],"svg",{"viewBox":56,"role":57,"ariaLabel":58,"xmlns":59,"style":60},"0 0 720 320","img","Comparison of auto, hint and manual popovers: which light-dismiss, which close other popovers when opened, and typical uses","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","width:100%;height:auto;max-width:720px;margin:2rem 0","\n  ",[63,64,65],"title",{},"auto, hint and manual",[67,68,69],"desc",{},"auto popovers light-dismiss and close unrelated auto popovers; used for menus and pickers. hint popovers light-dismiss and close other hints but not autos; used for tooltips. manual popovers do neither; used for toasts and persistent panels.",[71,72,77],"text",{"textAnchor":73,"x":74,"y":75,"style":76},"middle","360","26","text-anchor:middle;fill:currentColor;font:700 17px sans-serif","Three types, three relationships",[79,80],"rect",{"x":81,"y":82,"width":83,"height":84,"rx":85,"fill":86,"opacity":87},"220","46","150","34","6","#7aa2ff","0.3",[71,89,93],{"textAnchor":73,"x":90,"y":91,"style":92},"295","68","text-anchor:middle;fill:currentColor;font:600 12px sans-serif","light dismiss",[79,95],{"x":96,"y":82,"width":83,"height":84,"rx":85,"fill":86,"opacity":87},"380",[71,98,100],{"textAnchor":73,"x":99,"y":91,"style":92},"455","closes others",[79,102],{"x":103,"y":82,"width":83,"height":84,"rx":85,"fill":86,"opacity":87},"540",[71,105,107],{"textAnchor":73,"x":106,"y":91,"style":92},"615","typical use",[71,109,114],{"textAnchor":110,"x":111,"y":112,"style":113},"start","40","116","text-anchor:start;fill:currentColor;font:600 13px ui-monospace,monospace","popover=\"auto\"",[71,116,118],{"textAnchor":73,"x":90,"y":112,"style":117},"text-anchor:middle;fill:currentColor;font:12px sans-serif","yes",[71,120,121],{"textAnchor":73,"x":99,"y":112,"style":117},"unrelated autos",[71,123,124],{"textAnchor":73,"x":106,"y":112,"style":117},"menus, pickers",[71,126,128],{"textAnchor":110,"x":111,"y":127,"style":113},"166","popover=\"hint\"",[71,130,118],{"textAnchor":73,"x":90,"y":127,"style":117},[71,132,133],{"textAnchor":73,"x":99,"y":127,"style":117},"other hints only",[71,135,136],{"textAnchor":73,"x":106,"y":127,"style":117},"tooltips",[71,138,140],{"textAnchor":110,"x":111,"y":139,"style":113},"216","popover=\"manual\"",[71,142,143],{"textAnchor":73,"x":90,"y":139,"style":117},"no",[71,145,146],{"textAnchor":73,"x":99,"y":139,"style":117},"none",[71,148,149],{"textAnchor":73,"x":106,"y":139,"style":117},"toasts, panels",[151,152],"line",{"x1":153,"y1":154,"x2":155,"y2":154,"stroke":156,"strokeWidth":157,"opacity":158},"30","236","690","currentColor","1","0.4",[71,160,162],{"textAnchor":73,"x":74,"y":161,"style":117},"268","The bare attribute, popover with no value, means auto.",[71,164,166],{"textAnchor":73,"x":74,"y":165,"style":117},"292","hint is the newest type; where unsupported it behaves as manual.",[168,169,170,180,188],"ul",{},[171,172,173,179],"li",{},[174,175,176],"strong",{},[18,177,178],{},"auto"," (the default) is for overlays the user opens deliberately and expects to close by clicking away: menus, pickers, disclosures in the top layer. Opening an auto popover closes other auto popovers that are not its ancestors.",[171,181,182,187],{},[174,183,184],{},[18,185,186],{},"hint"," is for transient, supplementary overlays such as tooltips. A hint closes other hints when it opens but does not close auto popovers, so a tooltip can appear inside an open menu without destroying it.",[171,189,190,195],{},[174,191,192],{},[18,193,194],{},"manual"," is for overlays that manage their own lifetime: toasts, persistent panels, coach marks. They ignore light dismiss and never close others.",[34,197,199],{"id":198},"the-complete-implementation-a-menu-with-a-submenu","The complete implementation: a menu with a submenu",[14,201,202],{},"The page below has a menu whose \"Share\" item opens a submenu. The submenu stays open while the user works in it, and clicking outside closes both.",[204,205],"live-demo",{"name":206},"popover-nested-menu",[208,209,214],"pre",{"className":210,"code":211,"language":212,"meta":213,"style":213},"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>Nested popovers\u003C\u002Ftitle>\n\u003Cstyle>\n  body { font: 15px\u002F1.5 system-ui, sans-serif; margin: 2rem; }\n\n  [popover] {\n    margin: 0;\n    padding: 0.35rem;\n    border: 1px solid #cbd5e1;\n    border-radius: 10px;\n    background: #ffffff;\n    box-shadow: 0 10px 30px rgb(15 23 42 \u002F 0.15);\n  }\n  [popover] button {\n    display: block;\n    inline-size: 100%;\n    min-inline-size: 10rem;\n    padding: 0.45rem 0.7rem;\n    border: 0;\n    border-radius: 6px;\n    background: transparent;\n    font: inherit;\n    text-align: start;\n  }\n  [popover] button:hover, [popover] button:focus-visible { background: #eef2ff; outline: none; }\n  .trigger:focus-visible { outline: 2px solid #4338ca; outline-offset: 2px; }\n\n  \u002F* Anchor each popover to its own trigger. *\u002F\n  .trigger { anchor-name: --file; }\n  #file-menu { position-anchor: --file; position-area: block-end span-inline-end; }\n\n  .share-trigger { anchor-name: --share; }\n  #share-menu {\n    position-anchor: --share;\n    position-area: inline-end span-block-end;   \u002F* beside the item *\u002F\n    position-try-fallbacks: flip-inline;\n  }\n\u003C\u002Fstyle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cbutton class=\"trigger\" type=\"button\" popovertarget=\"file-menu\">File ▾\u003C\u002Fbutton>\n\n  \u003Cdiv id=\"file-menu\" popover>\n    \u003Cbutton type=\"button\">New\u003C\u002Fbutton>\n    \u003Cbutton type=\"button\">Open…\u003C\u002Fbutton>\n    \u003C!-- Because this trigger is INSIDE #file-menu, #share-menu becomes its\n         child in the popover stack: opening it keeps #file-menu open. -->\n    \u003Cbutton class=\"share-trigger\" type=\"button\" popovertarget=\"share-menu\">Share ▸\u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n\n  \u003Cdiv id=\"share-menu\" popover>\n    \u003Cbutton type=\"button\">Copy link\u003C\u002Fbutton>\n    \u003Cbutton type=\"button\">Email\u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n","html","",[18,215,216,235,255,265,283,308,322,332,386,393,404,418,433,453,468,481,524,530,546,559,575,589,608,619,632,644,657,669,674,721,755,760,767,781,806,811,824,832,841,858,867,872,882,891,901,940,945,965,986,1006,1012,1018,1052,1062,1067,1084,1104,1124,1133,1142],{"__ignoreMap":213},[217,218,220,224,228,232],"span",{"class":151,"line":219},1,[217,221,223],{"class":222},"suds8","\u003C!",[217,225,227],{"class":226},"sne4z","doctype",[217,229,231],{"class":230},"s-5SL"," html",[217,233,234],{"class":222},">\n",[217,236,238,241,243,246,249,253],{"class":151,"line":237},2,[217,239,240],{"class":222},"\u003C",[217,242,212],{"class":226},[217,244,245],{"class":230}," lang",[217,247,248],{"class":222},"=",[217,250,252],{"class":251},"sT6z2","\"en\"",[217,254,234],{"class":222},[217,256,258,260,263],{"class":151,"line":257},3,[217,259,240],{"class":222},[217,261,262],{"class":226},"head",[217,264,234],{"class":222},[217,266,268,270,273,276,278,281],{"class":151,"line":267},4,[217,269,240],{"class":222},[217,271,272],{"class":226},"meta",[217,274,275],{"class":230}," charset",[217,277,248],{"class":222},[217,279,280],{"class":251},"\"utf-8\"",[217,282,234],{"class":222},[217,284,286,288,290,293,295,298,301,303,306],{"class":151,"line":285},5,[217,287,240],{"class":222},[217,289,272],{"class":226},[217,291,292],{"class":230}," name",[217,294,248],{"class":222},[217,296,297],{"class":251},"\"viewport\"",[217,299,300],{"class":230}," content",[217,302,248],{"class":222},[217,304,305],{"class":251},"\"width=device-width, initial-scale=1\"",[217,307,234],{"class":222},[217,309,311,313,315,318,320],{"class":151,"line":310},6,[217,312,240],{"class":222},[217,314,63],{"class":226},[217,316,317],{"class":222},">Nested popovers\u003C\u002F",[217,319,63],{"class":226},[217,321,234],{"class":222},[217,323,325,327,330],{"class":151,"line":324},7,[217,326,240],{"class":222},[217,328,329],{"class":226},"style",[217,331,234],{"class":222},[217,333,335,338,341,344,347,350,354,357,360,363,366,369,372,375,377,380,383],{"class":151,"line":334},8,[217,336,337],{"class":226},"  body",[217,339,340],{"class":222}," { ",[217,342,343],{"class":230},"font",[217,345,346],{"class":222},": ",[217,348,349],{"class":230},"15",[217,351,353],{"class":352},"sHUrx","px",[217,355,356],{"class":222},"\u002F",[217,358,359],{"class":230},"1.5",[217,361,362],{"class":230}," system-ui",[217,364,365],{"class":222},", ",[217,367,368],{"class":230},"sans-serif",[217,370,371],{"class":222},"; ",[217,373,374],{"class":230},"margin",[217,376,346],{"class":222},[217,378,379],{"class":230},"2",[217,381,382],{"class":352},"rem",[217,384,385],{"class":222},"; }\n",[217,387,389],{"class":151,"line":388},9,[217,390,392],{"emptyLinePlaceholder":391},true,"\n",[217,394,396,399,401],{"class":151,"line":395},10,[217,397,398],{"class":222},"  [",[217,400,20],{"class":230},[217,402,403],{"class":222},"] {\n",[217,405,407,410,412,415],{"class":151,"line":406},11,[217,408,409],{"class":230},"    margin",[217,411,346],{"class":222},[217,413,414],{"class":230},"0",[217,416,417],{"class":222},";\n",[217,419,421,424,426,429,431],{"class":151,"line":420},12,[217,422,423],{"class":230},"    padding",[217,425,346],{"class":222},[217,427,428],{"class":230},"0.35",[217,430,382],{"class":352},[217,432,417],{"class":222},[217,434,436,439,441,443,445,448,451],{"class":151,"line":435},13,[217,437,438],{"class":230},"    border",[217,440,346],{"class":222},[217,442,157],{"class":230},[217,444,353],{"class":352},[217,446,447],{"class":230}," solid",[217,449,450],{"class":230}," #cbd5e1",[217,452,417],{"class":222},[217,454,456,459,461,464,466],{"class":151,"line":455},14,[217,457,458],{"class":230},"    border-radius",[217,460,346],{"class":222},[217,462,463],{"class":230},"10",[217,465,353],{"class":352},[217,467,417],{"class":222},[217,469,471,474,476,479],{"class":151,"line":470},15,[217,472,473],{"class":230},"    background",[217,475,346],{"class":222},[217,477,478],{"class":230},"#ffffff",[217,480,417],{"class":222},[217,482,484,487,489,491,494,496,499,501,504,507,509,512,515,518,521],{"class":151,"line":483},16,[217,485,486],{"class":230},"    box-shadow",[217,488,346],{"class":222},[217,490,414],{"class":230},[217,492,493],{"class":230}," 10",[217,495,353],{"class":352},[217,497,498],{"class":230}," 30",[217,500,353],{"class":352},[217,502,503],{"class":230}," rgb",[217,505,506],{"class":222},"(",[217,508,349],{"class":230},[217,510,511],{"class":230}," 23",[217,513,514],{"class":230}," 42",[217,516,517],{"class":222}," \u002F ",[217,519,520],{"class":230},"0.15",[217,522,523],{"class":222},");\n",[217,525,527],{"class":151,"line":526},17,[217,528,529],{"class":222},"  }\n",[217,531,533,535,537,540,543],{"class":151,"line":532},18,[217,534,398],{"class":222},[217,536,20],{"class":230},[217,538,539],{"class":222},"] ",[217,541,542],{"class":226},"button",[217,544,545],{"class":222}," {\n",[217,547,549,552,554,557],{"class":151,"line":548},19,[217,550,551],{"class":230},"    display",[217,553,346],{"class":222},[217,555,556],{"class":230},"block",[217,558,417],{"class":222},[217,560,562,565,567,570,573],{"class":151,"line":561},20,[217,563,564],{"class":230},"    inline-size",[217,566,346],{"class":222},[217,568,569],{"class":230},"100",[217,571,572],{"class":352},"%",[217,574,417],{"class":222},[217,576,578,581,583,585,587],{"class":151,"line":577},21,[217,579,580],{"class":230},"    min-inline-size",[217,582,346],{"class":222},[217,584,463],{"class":230},[217,586,382],{"class":352},[217,588,417],{"class":222},[217,590,592,594,596,599,601,604,606],{"class":151,"line":591},22,[217,593,423],{"class":230},[217,595,346],{"class":222},[217,597,598],{"class":230},"0.45",[217,600,382],{"class":352},[217,602,603],{"class":230}," 0.7",[217,605,382],{"class":352},[217,607,417],{"class":222},[217,609,611,613,615,617],{"class":151,"line":610},23,[217,612,438],{"class":230},[217,614,346],{"class":222},[217,616,414],{"class":230},[217,618,417],{"class":222},[217,620,622,624,626,628,630],{"class":151,"line":621},24,[217,623,458],{"class":230},[217,625,346],{"class":222},[217,627,85],{"class":230},[217,629,353],{"class":352},[217,631,417],{"class":222},[217,633,635,637,639,642],{"class":151,"line":634},25,[217,636,473],{"class":230},[217,638,346],{"class":222},[217,640,641],{"class":230},"transparent",[217,643,417],{"class":222},[217,645,647,650,652,655],{"class":151,"line":646},26,[217,648,649],{"class":230},"    font",[217,651,346],{"class":222},[217,653,654],{"class":230},"inherit",[217,656,417],{"class":222},[217,658,660,663,665,667],{"class":151,"line":659},27,[217,661,662],{"class":230},"    text-align",[217,664,346],{"class":222},[217,666,110],{"class":230},[217,668,417],{"class":222},[217,670,672],{"class":151,"line":671},28,[217,673,529],{"class":222},[217,675,677,679,681,683,685,688,691,693,695,697,700,702,705,707,710,712,715,717,719],{"class":151,"line":676},29,[217,678,398],{"class":222},[217,680,20],{"class":230},[217,682,539],{"class":222},[217,684,542],{"class":226},[217,686,687],{"class":230},":hover",[217,689,690],{"class":222},", [",[217,692,20],{"class":230},[217,694,539],{"class":222},[217,696,542],{"class":226},[217,698,699],{"class":230},":focus-visible",[217,701,340],{"class":222},[217,703,704],{"class":230},"background",[217,706,346],{"class":222},[217,708,709],{"class":230},"#eef2ff",[217,711,371],{"class":222},[217,713,714],{"class":230},"outline",[217,716,346],{"class":222},[217,718,146],{"class":230},[217,720,385],{"class":222},[217,722,724,727,729,731,733,735,737,739,742,744,747,749,751,753],{"class":151,"line":723},30,[217,725,726],{"class":230},"  .trigger:focus-visible",[217,728,340],{"class":222},[217,730,714],{"class":230},[217,732,346],{"class":222},[217,734,379],{"class":230},[217,736,353],{"class":352},[217,738,447],{"class":230},[217,740,741],{"class":230}," #4338ca",[217,743,371],{"class":222},[217,745,746],{"class":230},"outline-offset",[217,748,346],{"class":222},[217,750,379],{"class":230},[217,752,353],{"class":352},[217,754,385],{"class":222},[217,756,758],{"class":151,"line":757},31,[217,759,392],{"emptyLinePlaceholder":391},[217,761,763],{"class":151,"line":762},32,[217,764,766],{"class":765},"sLBg1","  \u002F* Anchor each popover to its own trigger. *\u002F\n",[217,768,770,773,775,778],{"class":151,"line":769},33,[217,771,772],{"class":230},"  .trigger",[217,774,340],{"class":222},[217,776,777],{"class":230},"anchor-name",[217,779,780],{"class":222},": --file; }\n",[217,782,784,787,789,792,795,798,800,803],{"class":151,"line":783},34,[217,785,786],{"class":230},"  #file-menu",[217,788,340],{"class":222},[217,790,791],{"class":230},"position-anchor",[217,793,794],{"class":222},": --file; ",[217,796,797],{"class":230},"position-area",[217,799,346],{"class":222},[217,801,802],{"class":230},"block-end",[217,804,805],{"class":222}," span-inline-end; }\n",[217,807,809],{"class":151,"line":808},35,[217,810,392],{"emptyLinePlaceholder":391},[217,812,814,817,819,821],{"class":151,"line":813},36,[217,815,816],{"class":230},"  .share-trigger",[217,818,340],{"class":222},[217,820,777],{"class":230},[217,822,823],{"class":222},": --share; }\n",[217,825,827,830],{"class":151,"line":826},37,[217,828,829],{"class":230},"  #share-menu",[217,831,545],{"class":222},[217,833,835,838],{"class":151,"line":834},38,[217,836,837],{"class":230},"    position-anchor",[217,839,840],{"class":222},": --share;\n",[217,842,844,847,849,852,855],{"class":151,"line":843},39,[217,845,846],{"class":230},"    position-area",[217,848,346],{"class":222},[217,850,851],{"class":230},"inline-end",[217,853,854],{"class":222}," span-block-end;   ",[217,856,857],{"class":765},"\u002F* beside the item *\u002F\n",[217,859,861,864],{"class":151,"line":860},40,[217,862,863],{"class":230},"    position-try-fallbacks",[217,865,866],{"class":222},": flip-inline;\n",[217,868,870],{"class":151,"line":869},41,[217,871,529],{"class":222},[217,873,875,878,880],{"class":151,"line":874},42,[217,876,877],{"class":222},"\u003C\u002F",[217,879,329],{"class":226},[217,881,234],{"class":222},[217,883,885,887,889],{"class":151,"line":884},43,[217,886,877],{"class":222},[217,888,262],{"class":226},[217,890,234],{"class":222},[217,892,894,896,899],{"class":151,"line":893},44,[217,895,240],{"class":222},[217,897,898],{"class":226},"body",[217,900,234],{"class":222},[217,902,904,907,909,912,914,917,920,922,925,928,930,933,936,938],{"class":151,"line":903},45,[217,905,906],{"class":222},"  \u003C",[217,908,542],{"class":226},[217,910,911],{"class":230}," class",[217,913,248],{"class":222},[217,915,916],{"class":251},"\"trigger\"",[217,918,919],{"class":230}," type",[217,921,248],{"class":222},[217,923,924],{"class":251},"\"button\"",[217,926,927],{"class":230}," popovertarget",[217,929,248],{"class":222},[217,931,932],{"class":251},"\"file-menu\"",[217,934,935],{"class":222},">File ▾\u003C\u002F",[217,937,542],{"class":226},[217,939,234],{"class":222},[217,941,943],{"class":151,"line":942},46,[217,944,392],{"emptyLinePlaceholder":391},[217,946,948,950,953,956,958,960,963],{"class":151,"line":947},47,[217,949,906],{"class":222},[217,951,952],{"class":226},"div",[217,954,955],{"class":230}," id",[217,957,248],{"class":222},[217,959,932],{"class":251},[217,961,962],{"class":230}," popover",[217,964,234],{"class":222},[217,966,968,971,973,975,977,979,982,984],{"class":151,"line":967},48,[217,969,970],{"class":222},"    \u003C",[217,972,542],{"class":226},[217,974,919],{"class":230},[217,976,248],{"class":222},[217,978,924],{"class":251},[217,980,981],{"class":222},">New\u003C\u002F",[217,983,542],{"class":226},[217,985,234],{"class":222},[217,987,989,991,993,995,997,999,1002,1004],{"class":151,"line":988},49,[217,990,970],{"class":222},[217,992,542],{"class":226},[217,994,919],{"class":230},[217,996,248],{"class":222},[217,998,924],{"class":251},[217,1000,1001],{"class":222},">Open…\u003C\u002F",[217,1003,542],{"class":226},[217,1005,234],{"class":222},[217,1007,1009],{"class":151,"line":1008},50,[217,1010,1011],{"class":765},"    \u003C!-- Because this trigger is INSIDE #file-menu, #share-menu becomes its\n",[217,1013,1015],{"class":151,"line":1014},51,[217,1016,1017],{"class":765},"         child in the popover stack: opening it keeps #file-menu open. -->\n",[217,1019,1021,1023,1025,1027,1029,1032,1034,1036,1038,1040,1042,1045,1048,1050],{"class":151,"line":1020},52,[217,1022,970],{"class":222},[217,1024,542],{"class":226},[217,1026,911],{"class":230},[217,1028,248],{"class":222},[217,1030,1031],{"class":251},"\"share-trigger\"",[217,1033,919],{"class":230},[217,1035,248],{"class":222},[217,1037,924],{"class":251},[217,1039,927],{"class":230},[217,1041,248],{"class":222},[217,1043,1044],{"class":251},"\"share-menu\"",[217,1046,1047],{"class":222},">Share ▸\u003C\u002F",[217,1049,542],{"class":226},[217,1051,234],{"class":222},[217,1053,1055,1058,1060],{"class":151,"line":1054},53,[217,1056,1057],{"class":222},"  \u003C\u002F",[217,1059,952],{"class":226},[217,1061,234],{"class":222},[217,1063,1065],{"class":151,"line":1064},54,[217,1066,392],{"emptyLinePlaceholder":391},[217,1068,1070,1072,1074,1076,1078,1080,1082],{"class":151,"line":1069},55,[217,1071,906],{"class":222},[217,1073,952],{"class":226},[217,1075,955],{"class":230},[217,1077,248],{"class":222},[217,1079,1044],{"class":251},[217,1081,962],{"class":230},[217,1083,234],{"class":222},[217,1085,1087,1089,1091,1093,1095,1097,1100,1102],{"class":151,"line":1086},56,[217,1088,970],{"class":222},[217,1090,542],{"class":226},[217,1092,919],{"class":230},[217,1094,248],{"class":222},[217,1096,924],{"class":251},[217,1098,1099],{"class":222},">Copy link\u003C\u002F",[217,1101,542],{"class":226},[217,1103,234],{"class":222},[217,1105,1107,1109,1111,1113,1115,1117,1120,1122],{"class":151,"line":1106},57,[217,1108,970],{"class":222},[217,1110,542],{"class":226},[217,1112,919],{"class":230},[217,1114,248],{"class":222},[217,1116,924],{"class":251},[217,1118,1119],{"class":222},">Email\u003C\u002F",[217,1121,542],{"class":226},[217,1123,234],{"class":222},[217,1125,1127,1129,1131],{"class":151,"line":1126},58,[217,1128,1057],{"class":222},[217,1130,952],{"class":226},[217,1132,234],{"class":222},[217,1134,1136,1138,1140],{"class":151,"line":1135},59,[217,1137,877],{"class":222},[217,1139,898],{"class":226},[217,1141,234],{"class":222},[217,1143,1145,1147,1149],{"class":151,"line":1144},60,[217,1146,877],{"class":222},[217,1148,212],{"class":226},[217,1150,234],{"class":222},[14,1152,1153,1154,1157,1158,1161],{},"The submenu's ",[18,1155,1156],{},"popovertarget"," button sits inside the parent popover. That DOM relationship is what makes the browser treat the submenu as a ",[42,1159,1160],{},"child"," in the popover stack. Without it — if the \"Share\" trigger lived elsewhere — opening the submenu would close the file menu, because it would be an unrelated auto popover.",[34,1163,1165],{"id":1164},"the-key-technique-the-popover-stack","The key technique: the popover stack",[14,1167,1168,1169,1172],{},"Open auto popovers form a stack. When a new auto popover opens, the browser looks at its ",[42,1170,1171],{},"invoker"," — the button that opened it — and checks whether that invoker is inside a popover already in the stack. If so, the new popover is pushed as that popover's child and the ancestors stay open. If not, every open auto popover that is not an ancestor is closed first.",[54,1174,61,1177,61,1180,61,1183,61,1186,61,1193,61,1199,61,1203,61,1207,61,1211,61,1215,61,1220,61,1222,61,1225,61,1228,61,1232],{"viewBox":1175,"role":57,"ariaLabel":1176,"xmlns":59,"style":60},"0 0 720 290","Popover stack diagram: File menu at the bottom, Share submenu as its child on top; clicking outside closes both, opening an unrelated menu closes both",[63,1178,1179],{},"How the auto popover stack behaves",[67,1181,1182],{},"The stack holds the File menu with the Share submenu above it as a child. Clicking inside Share keeps both open. Clicking outside everything closes Share then File. Opening an unrelated Help menu closes both and pushes Help.",[71,1184,1185],{"textAnchor":73,"x":74,"y":75,"style":76},"The auto popover stack",[79,1187],{"x":1188,"y":1189,"width":1190,"height":1191,"rx":1192,"fill":86,"opacity":87},"60","170","200","44","8",[71,1194,1198],{"textAnchor":73,"x":1195,"y":1196,"style":1197},"160","197","text-anchor:middle;fill:currentColor;font:12px ui-monospace,monospace","#file-menu",[79,1200],{"x":1188,"y":1201,"width":1190,"height":1191,"rx":1192,"fill":86,"opacity":1202},"120","0.5",[71,1204,1206],{"textAnchor":73,"x":1195,"y":1205,"style":1197},"147","#share-menu (child)",[71,1208,1210],{"textAnchor":73,"x":1195,"y":1209,"style":117},"240","stack, top = most recent",[79,1212],{"x":1213,"y":1188,"width":74,"height":1191,"rx":1192,"fill":146,"stroke":156,"strokeWidth":359,"opacity":1214},"320","0.6",[71,1216,1219],{"textAnchor":73,"x":1217,"y":1218,"style":117},"500","87","click inside Share → both stay open",[79,1221],{"x":1213,"y":1201,"width":74,"height":1191,"rx":1192,"fill":146,"stroke":156,"strokeWidth":359,"opacity":1214},[71,1223,1224],{"textAnchor":73,"x":1217,"y":1205,"style":117},"click outside all → Share, then File close",[79,1226],{"x":1213,"y":1227,"width":74,"height":1191,"rx":1192,"fill":146,"stroke":156,"strokeWidth":359,"opacity":1214},"180",[71,1229,1231],{"textAnchor":73,"x":1217,"y":1230,"style":117},"207","open unrelated Help → both close, Help pushed",[71,1233,1235],{"textAnchor":73,"x":1217,"y":1234,"style":117},"250","Escape closes the top popover only",[14,1237,1238],{},"Escape closes only the topmost popover, so a user in a submenu presses Escape once to return to the parent menu and again to close it, which matches desktop menu conventions. Light dismiss — a click outside — closes every popover above the point clicked; a click inside the parent menu but outside the submenu closes only the submenu.",[14,1240,1241,1242,1245,1246,1248],{},"Painting order follows the stack too. Every element in the top layer paints above the page, and later additions to the top layer paint above earlier ones, so the submenu is always drawn over its parent without any ",[18,1243,1244],{},"z-index",". That is also why ",[18,1247,1244],{}," has no effect on top-layer elements relative to each other: their order is the order they were shown.",[34,1250,1252],{"id":1251},"mixing-types-a-tooltip-inside-a-menu","Mixing types: a tooltip inside a menu",[14,1254,1255,1256,1258,1259,1261,1262,1264],{},"A tooltip explaining a menu item should appear without closing the menu, and a new tooltip should replace the old one. That is exactly the ",[18,1257,186],{}," behaviour. Where ",[18,1260,186],{}," is not supported it falls back to ",[18,1263,194],{},", which never light-dismisses; either way the menu survives.",[208,1266,1268],{"className":210,"code":1267,"language":212,"meta":213,"style":213},"\u003Cdiv id=\"file-menu\" popover>\n  \u003Cbutton type=\"button\" popovertarget=\"export-hint\" popovertargetaction=\"toggle\"\n          aria-describedby=\"export-hint\">Export…\u003C\u002Fbutton>\n\u003C\u002Fdiv>\n\u003Cdiv id=\"export-hint\" popover=\"hint\" role=\"tooltip\">Saves a copy in another format.\u003C\u002Fdiv>\n",[18,1269,1270,1286,1313,1329,1337],{"__ignoreMap":213},[217,1271,1272,1274,1276,1278,1280,1282,1284],{"class":151,"line":219},[217,1273,240],{"class":222},[217,1275,952],{"class":226},[217,1277,955],{"class":230},[217,1279,248],{"class":222},[217,1281,932],{"class":251},[217,1283,962],{"class":230},[217,1285,234],{"class":222},[217,1287,1288,1290,1292,1294,1296,1298,1300,1302,1305,1308,1310],{"class":151,"line":237},[217,1289,906],{"class":222},[217,1291,542],{"class":226},[217,1293,919],{"class":230},[217,1295,248],{"class":222},[217,1297,924],{"class":251},[217,1299,927],{"class":230},[217,1301,248],{"class":222},[217,1303,1304],{"class":251},"\"export-hint\"",[217,1306,1307],{"class":230}," popovertargetaction",[217,1309,248],{"class":222},[217,1311,1312],{"class":251},"\"toggle\"\n",[217,1314,1315,1318,1320,1322,1325,1327],{"class":151,"line":257},[217,1316,1317],{"class":230},"          aria-describedby",[217,1319,248],{"class":222},[217,1321,1304],{"class":251},[217,1323,1324],{"class":222},">Export…\u003C\u002F",[217,1326,542],{"class":226},[217,1328,234],{"class":222},[217,1330,1331,1333,1335],{"class":151,"line":267},[217,1332,877],{"class":222},[217,1334,952],{"class":226},[217,1336,234],{"class":222},[217,1338,1339,1341,1343,1345,1347,1349,1351,1353,1356,1359,1361,1364,1367,1369],{"class":151,"line":285},[217,1340,240],{"class":222},[217,1342,952],{"class":226},[217,1344,955],{"class":230},[217,1346,248],{"class":222},[217,1348,1304],{"class":251},[217,1350,962],{"class":230},[217,1352,248],{"class":222},[217,1354,1355],{"class":251},"\"hint\"",[217,1357,1358],{"class":230}," role",[217,1360,248],{"class":222},[217,1362,1363],{"class":251},"\"tooltip\"",[217,1365,1366],{"class":222},">Saves a copy in another format.\u003C\u002F",[217,1368,952],{"class":226},[217,1370,234],{"class":222},[14,1372,1373,1374,1378,1379,1383,1384,1386],{},"For tooltips shown on hover and focus rather than on click, the anchoring and timing techniques are covered in ",[23,1375,1377],{"href":1376},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioned-tooltips\u002F","Anchor-Positioned Tooltips"," and ",[23,1380,1382],{"href":1381},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fhover-intent-delays-with-transition-delay\u002F","Hover Intent Delays With transition-delay",". Toasts should be ",[18,1385,194],{},", so a user clicking a menu does not accidentally dismiss a message they have not read.",[34,1388,1390],{"id":1389},"popovers-inside-dialogs-and-dialogs-above-popovers","Popovers inside dialogs, and dialogs above popovers",[14,1392,1393,1394,1397],{},"Modal dialogs also live in the top layer, and they interact with popovers in two useful ways. A popover opened from a button ",[42,1395,1396],{},"inside"," a modal dialog appears above the dialog, because it was added to the top layer later, and it light-dismisses normally within the dialog — so date pickers, menus and comboboxes inside a modal just work. Opening a modal dialog while auto popovers are open closes those popovers, since the dialog makes the rest of the page inert and a menu left floating over an inert page would be unusable.",[14,1399,1400,1401,1404,1405,1409],{},"Two practical consequences follow. First, a settings panel built as a modal ",[18,1402,1403],{},"\u003Cdialog>"," can host any number of popover-based controls without special handling. Second, a \"confirm\" dialog launched from a menu item does not need script to close the menu first — the browser does it. The animations for both layers, including keeping the closing menu visible for its exit transition, are covered in ",[23,1406,1408],{"href":1407},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fanimating-dialog-open-and-close\u002F","Animating dialog Open and Close",".",[34,1411,1413],{"id":1412},"focus-and-accessibility","Focus and accessibility",[14,1415,1416,1417,1419,1420,1423],{},"Popovers are not modal: the rest of the page remains interactive and in the tab order. When a popover opened by a ",[18,1418,1156],{}," button closes via Escape or light dismiss and focus was inside it, browsers return focus to the invoking button, which keeps keyboard users oriented. The invoking button also receives the correct ",[18,1421,1422],{},"aria-expanded"," state automatically.",[14,1425,1426,1427,1429,1430,365,1433,1436],{},"What the popover API does ",[42,1428,44],{}," provide is menu semantics or arrow-key navigation. A popover of buttons is announced as a group of buttons, which is acceptable for simple action menus; for application-style menus following the ARIA menu pattern, add ",[18,1431,1432],{},"role=\"menu\"",[18,1434,1435],{},"role=\"menuitem\""," and arrow-key handling with script. Keep every item reachable by Tab in the meantime, so the menu is operable even without the enhanced keyboard support.",[34,1438,1440],{"id":1439},"browser-support","Browser support",[14,1442,1443,1444,1446,1447,1378,1449,1451,1452,1454,1455,1457],{},"The ",[18,1445,20],{}," attribute with ",[18,1448,178],{},[18,1450,194],{}," is supported in Chrome and Edge 114+, Firefox 125+ and Safari 17+, including the nested popover stack and light dismiss. ",[18,1453,128],{}," is newer and supported in current Chromium releases; elsewhere it behaves as ",[18,1456,194],{},". Anchor positioning, used to place the menus, is supported in Chrome and Edge 125+, Firefox 147+ and Safari 26+; without it, popovers appear centred in the viewport but keep their stacking and dismissal behaviour.",[34,1459,1461],{"id":1460},"faq","FAQ",[14,1463,1464,1467,1468,1470,1471,1473],{},[174,1465,1466],{},"What is light dismiss?","\nClosing a popover when the user clicks or taps outside it or presses Escape. Popovers with ",[18,1469,114],{}," get light dismiss automatically; ",[18,1472,140],{}," popovers do not and stay open until closed explicitly.",[14,1475,1476,1479],{},[174,1477,1478],{},"How do nested popover menus stay open?","\nAn auto popover opened from a trigger inside another auto popover becomes its child in the popover stack. Opening the child does not close the parent, and clicking inside the child does not light-dismiss the parent. Clicking outside both closes the whole chain.",[14,1481,1482,1485,1487,1488,1490,1491,1493],{},[174,1483,1484],{},"What is the difference between auto, manual and hint popovers?",[18,1486,178],{}," popovers light-dismiss and close other unrelated auto popovers when opened. ",[18,1489,194],{}," popovers never light-dismiss and do not affect others. ",[18,1492,186],{}," popovers, intended for tooltips, close other hints but leave open auto popovers alone.",[14,1495,1496,1499,1500,1502],{},[174,1497,1498],{},"Where does focus go when a popover closes?","\nWhen a popover opened by a ",[18,1501,1156],{}," button is closed with Escape or light dismiss, focus returns to the button if focus was inside the popover. Test this in each browser you support, since top-layer focus handling has been refined across releases.",[34,1504,1506],{"id":1505},"related","Related",[168,1508,1509,1514,1521,1528],{},[171,1510,1511,1513],{},[23,1512,26],{"href":25}," — the parent guide.",[171,1515,1516,1520],{},[23,1517,1519],{"href":1518},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-attribute-and-css-styling\u002F","Popover Attribute and CSS Styling"," — styling states of a single popover.",[171,1522,1523,1527],{},[23,1524,1526],{"href":1525},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-size-for-matching-widths\u002F","anchor-size(): Overlays That Match Triggers"," — sizing the menus in this stack.",[171,1529,1530,1534],{},[23,1531,1533],{"href":1532},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002F","Dialog & Popover Animations"," — animating each layer as it opens and closes.",[329,1536,1537],{},"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);}",{"title":213,"searchDepth":237,"depth":237,"links":1539},[1540,1541,1542,1543,1544,1545,1546,1547,1548,1549],{"id":36,"depth":237,"text":37},{"id":51,"depth":237,"text":52},{"id":198,"depth":237,"text":199},{"id":1164,"depth":237,"text":1165},{"id":1251,"depth":237,"text":1252},{"id":1389,"depth":237,"text":1390},{"id":1412,"depth":237,"text":1413},{"id":1439,"depth":237,"text":1440},{"id":1460,"depth":237,"text":1461},{"id":1505,"depth":237,"text":1506},"How popover=auto, manual and hint behave together: light dismiss, nested menus that stay open, stacking order in the top layer, and focus when popovers close.","md",{"pageTitle":5,"datePublished":1553,"dateModified":1553,"faq":1554},"2026-09-18",[1555,1557,1559,1561],{"q":1466,"a":1556},"Closing a popover when the user clicks or taps outside it or presses Escape. Popovers with popover=\"auto\" get light dismiss automatically; popover=\"manual\" popovers do not and stay open until closed explicitly.",{"q":1478,"a":1558},"An auto popover opened from a trigger inside another auto popover becomes its child in the popover stack. Opening the child does not close the parent, and clicking inside the child does not light-dismiss the parent. Clicking outside both closes the whole chain.",{"q":1484,"a":1560},"auto popovers light-dismiss and close other unrelated auto popovers when opened. manual popovers never light-dismiss and do not affect others. hint popovers, intended for tooltips, close other hints but leave open auto popovers alone.",{"q":1498,"a":1562},"When a popover opened by a popovertarget button is closed with Escape or light dismiss, focus returns to the button if focus was inside the popover. Test this in each browser you support, since top-layer focus handling has been refined across releases.","\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-light-dismiss-and-stacking",{"title":5,"description":1550},"mastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-light-dismiss-and-stacking\u002Findex","bnh9Myjwx4CZNn0PV1VzEQIdKJfJRA2BBBOh3j_cgZU",[1568,1571,1574,1577,1580,1583,1586,1589,1592,1595,1598,1601,1604,1607,1610,1613,1616,1619,1622,1625,1628,1631,1634,1637,1640,1643,1646,1649,1652,1655,1658,1661,1664,1667,1670,1673,1676,1679,1682,1685,1688,1691,1694,1697,1700,1703,1706,1709,1712,1715,1718,1721,1724,1727,1730,1733,1736,1739,1742,1745,1748,1751,1754,1757,1760,1763,1766,1769,1772,1775,1778,1781,1784,1787,1790,1793,1796,1799,1802,1805,1808,1811,1814,1817,1820,1823,1826,1829,1832,1835,1838,1841,1844,1847,1849,1852,1855,1858,1861,1864,1865,1868,1871,1874,1877,1880,1883,1886,1889,1892,1895,1898,1901,1904,1907,1910,1913,1916,1919,1922,1925,1928,1931,1934,1937,1940,1943,1946,1949,1952,1955,1958,1961,1964,1967,1970,1973,1976,1979,1982,1985,1987,1990,1993,1996,1999,2002,2005,2008,2011,2014,2017,2020,2023,2026,2029,2032,2035,2038,2041,2044,2047,2050,2053,2056,2059,2062,2065,2068,2071,2074,2077,2080,2083,2086,2089,2092,2095,2098,2101,2104,2107,2110,2113,2116,2119,2122],{"path":1569,"title":1570},"\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":1572,"title":1573},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fflashing-content-and-seizure-thresholds","Flashing Content and Seizure Thresholds",{"path":1575,"title":1576},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fforced-colors-mode-and-animations","Forced Colors Mode and Animations",{"path":1578,"title":1579},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations","Accessibility in CSS Animations: Patterns, Specs & Best Practices",{"path":1581,"title":1582},"\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":1584,"title":1585},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fprefers-reduced-motion-recipes","prefers-reduced-motion Recipes: A Reduction for Every Common Effect",{"path":1587,"title":1588},"\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":1590,"title":1591},"\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":1593,"title":1594},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fvestibular-safe-animation-patterns","Vestibular-Safe Animation Patterns: Why Some Motion Makes People Sick",{"path":1596,"title":1597},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fwcag-motion-success-criteria","WCAG Motion Success Criteria: What Each One Actually Requires",{"path":1599,"title":1600},"\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":1602,"title":1603},"\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":1605,"title":1606},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations","Clip-Path & Mask Animations: Animating Visibility Instead of Position",{"path":1608,"title":1609},"\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":1611,"title":1612},"\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":1614,"title":1615},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fanimating-gradients","Animating CSS Gradients: Smooth Colour Motion Without Jumps",{"path":1617,"title":1618},"\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":1620,"title":1621},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions","Color & Theme Transitions: Colour as Part of the Motion System",{"path":1623,"title":1624},"\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":1626,"title":1627},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fsmooth-theme-switching-transitions","Smooth Theme Switching: Crossfades, Circular Reveals and No Flash",{"path":1629,"title":1630},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fcontainer-query-hover-affordances","Container Query Hover Affordances: When Narrow Means Persistent, Not Hidden",{"path":1632,"title":1633},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion","Container-Aware Motion: Animation Sized by the Space a Component Actually Has",{"path":1635,"title":1636},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Flayout-change-animations-at-container-breakpoints","Animating Changes at Container Breakpoints",{"path":1638,"title":1639},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fmotion-driven-by-container-style-queries","Motion Driven by Container Style Queries",{"path":1641,"title":1642},"\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":1644,"title":1645},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fsuppressing-motion-in-small-containers","Suppressing Motion in Small Containers: Deliberately Animating Nothing",{"path":1647,"title":1648},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fcontrolling-css-animations-from-javascript","Controlling CSS Animations From JavaScript",{"path":1650,"title":1651},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api","CSS Animation vs the Web Animations API: A Decision Guide",{"path":1653,"title":1654},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fwaapi-vs-css-for-interruptible-ui","Interruptible UI: CSS Transitions vs WAAPI",{"path":1656,"title":1657},"\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":1659,"title":1660},"\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":1662,"title":1663},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fcustom-property-fallbacks-and-invalid-values","Custom Property Fallbacks and Invalid Values",{"path":1665,"title":1666},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Ffluid-spacing-tokens-driving-transition-durations","Fluid Spacing Tokens That Drive Transition Durations",{"path":1668,"title":1669},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture","CSS Custom Properties Architecture: Scalable Design Systems & Dynamic UI",{"path":1671,"title":1672},"\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":1674,"title":1675},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fscoping-custom-properties-to-components","Scoping Custom Properties to Components",{"path":1677,"title":1678},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fcss-transition-timing-functions","CSS Transition Timing Functions: ease, cubic-bezier(), steps() and linear()",{"path":1680,"title":1681},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals","CSS Transition Fundamentals: Architecture, Performance & Patterns",{"path":1683,"title":1684},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Finterrupted-and-reversing-transitions","Interrupted and Reversing Transitions: What Happens Mid-Flight",{"path":1686,"title":1687},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fstarting-style-entry-animations","@starting-style: Animating an Element's Very First Style Change",{"path":1689,"title":1690},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-delay-choreography","Choreographing Motion With transition-delay",{"path":1692,"title":1693},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-shorthand-and-multiple-properties","The transition Shorthand and Multiple Properties",{"path":1695,"title":1696},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransitioning-display-with-allow-discrete","Transitioning display with transition-behavior: allow-discrete and @starting-style",{"path":1698,"title":1699},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fanimating-dialog-open-and-close","Animating \u003Cdialog> Open and Close: Both Directions, No Library",{"path":1701,"title":1702},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fbackdrop-animations","Animating ::backdrop: Fades and Blurs Behind Dialogs and Popovers",{"path":1704,"title":1705},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations","Dialog & Popover Animations: Motion for the Top Layer",{"path":1707,"title":1708},"\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":1710,"title":1711},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fpopover-entry-and-exit-transitions","Popover Menus That Animate From Their Anchor",{"path":1713,"title":1714},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fchoosing-animation-durations","Choosing Animation Durations: How Long Motion Should Last",{"path":1716,"title":1717},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fcubic-bezier-overshoot-and-anticipation","Overshoot and Anticipation With cubic-bezier(): Motion With Character",{"path":1719,"title":1720},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fentry-vs-exit-easing","Entry vs Exit Easing: Different Curves for Arriving and Leaving",{"path":1722,"title":1723},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design","Easing & Motion Design: Making CSS Motion Feel Intentional",{"path":1725,"title":1726},"\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":1728,"title":1729},"\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":1731,"title":1732},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Faccessible-css-only-tooltips","Accessible CSS-Only Tooltips and Hover Cards With  and ",{"path":1734,"title":1735},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fbutton-press-and-active-states","Button Press and  States",{"path":1737,"title":1738},"\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":1740,"title":1741},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Ffocus-within-form-patterns"," Form Patterns: Styling a Group From the Field Inside It",{"path":1743,"title":1744},"\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":1746,"title":1747},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design","Hover & Focus State Design: Spec-Compliant Patterns for Modern UIs",{"path":1749,"title":1750},"\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":1752,"title":1753},"\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":1755,"title":1756},"\u002Fcss-only-micro-interactions-animations","CSS-Only Micro-Interactions & Animations: Architecture, Performance & Implementation",{"path":1758,"title":1759},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fanimation-composition-and-stacking","Stacking Animations With animation-composition",{"path":1761,"title":1762},"\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":1764,"title":1765},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcontainer-query-triggered-keyframe-animations","Container-Query-Triggered Keyframe Animations: Animate Differently per Available Space",{"path":1767,"title":1768},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-accordions-and-disclosure","CSS-Only Accordions and Disclosure Widgets with details and summary",{"path":1770,"title":1771},"\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":1773,"title":1774},"\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":1776,"title":1777},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns","Keyframe Animation Patterns: Spec-Compliant Architectures for Modern UIs",{"path":1779,"title":1780},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fmulti-step-keyframes-and-per-keyframe-easing","Multi-Step Keyframes and Per-Keyframe Easing",{"path":1782,"title":1783},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fstaggered-list-animations-with-custom-properties","Staggered List Animations Using --i Index Custom Properties",{"path":1785,"title":1786},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fanimating-box-shadow-and-filters-cheaply","Animating box-shadow and Filters Cheaply",{"path":1788,"title":1789},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcontain-property-for-animation-performance","The contain Property for Animation Performance",{"path":1791,"title":1792},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcss-triggers-layout-paint-composite","Layout, Paint and Composite: What Triggers What",{"path":1794,"title":1795},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration","Performance & GPU Acceleration in CSS: A Developer’s Blueprint",{"path":1797,"title":1798},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Foptimizing-css-animations-for-60fps","Optimizing CSS Animations for 60fps: Budgeting the Frame",{"path":1800,"title":1801},"\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":1803,"title":1804},"\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":1806,"title":1807},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations","Scroll-Driven Animations: Binding Motion to Scroll Position in Pure CSS",{"path":1809,"title":1810},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-animation-fallbacks","Shipping Scroll-Driven Animations Without Breaking Anything",{"path":1812,"title":1813},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-parallax-effects","Scroll-Driven Parallax Effects in CSS",{"path":1815,"title":1816},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-progress-bar-without-javascript","A Reading Progress Bar Driven by scroll(root)",{"path":1818,"title":1819},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-triggered-reveal-animations","Reveal-on-Scroll with view() and animation-range",{"path":1821,"title":1822},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Ftimeline-scope-for-cross-element-animations","timeline-scope for Cross-Element Animations",{"path":1824,"title":1825},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fview-timeline-and-animation-range","View Timelines and animation-range",{"path":1827,"title":1828},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fcross-document-view-transitions","Cross-Document View Transitions",{"path":1830,"title":1831},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers","View Transitions for CSS Developers: the Pseudo-Element Tree, Snapshots, and Named Elements",{"path":1833,"title":1834},"\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":1836,"title":1837},"\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":1839,"title":1840},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transition-types-and-classes","View Transition Types and Classes",{"path":1842,"title":1843},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-for-list-reordering","View Transitions for List Reordering",{"path":1845,"title":1846},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-with-reduced-motion","Honouring prefers-reduced-motion in View Transitions",{"path":356,"title":1848},"Modern CSS Layouts & Micro-Interactions",{"path":1850,"title":1851},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioned-tooltips","Anchor-Positioned Tooltips: Tethering, Flipping, and Getting the Semantics Right",{"path":1853,"title":1854},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioning-fallbacks","Anchor Positioning Fallbacks: A Graceful Floor for Older Browser Versions",{"path":1856,"title":1857},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-size-for-matching-widths","anchor-size(): Overlays That Match Their Trigger's Size",{"path":1859,"title":1860},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays","CSS Anchor Positioning and Overlays: Tethering Elements Without JavaScript",{"path":1862,"title":1863},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-attribute-and-css-styling","The popover Attribute: Top-Layer Overlays With No JavaScript",{"path":1563,"title":5},{"path":1866,"title":1867},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fposition-area-grid-explained","position-area: The Anchor Placement Grid",{"path":1869,"title":1870},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fcontainer-query-polyfill-tradeoffs","Container Query Polyfills: What They Cost and When to Skip Them",{"path":1872,"title":1873},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ffeature-detection-with-supports","Feature Detection with @supports: Syntax, Semantics, and the Traps",{"path":1875,"title":1876},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fhandling-container-query-fallbacks-for-older-browsers","Handling Container Query Fallbacks for Older Browsers",{"path":1878,"title":1879},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks","Container Query Fallbacks: Spec-Compliant CSS Strategies for Legacy Browsers",{"path":1881,"title":1882},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fintrinsic-layout-fallbacks-without-queries","Intrinsic Layout Fallbacks: Baselines That Adapt Without Any Query",{"path":1884,"title":1885},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ftesting-fallbacks-without-old-browsers","Testing CSS Fallbacks Without an Old Browser",{"path":1887,"title":1888},"\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":1890,"title":1891},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-query-range-and-logic-operators","Container Query Range Syntax and Logic Operators",{"path":1893,"title":1894},"\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":1896,"title":1897},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-type-size-vs-inline-size","Choosing container-type: inline-size, size, or normal",{"path":1899,"title":1900},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-vs-media-queries-comparison","Container vs Media Queries: Choosing the Right Reference Box",{"path":1902,"title":1903},"\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":1905,"title":1906},"\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":1908,"title":1909},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics","Container Query Syntax Basics",{"path":1911,"title":1912},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fnesting-and-naming-container-queries","Nesting and Naming Container Queries: Targeting the Right Ancestor",{"path":1914,"title":1915},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fauto-fit-minmax-responsive-grids","Responsive Grids with repeat(auto-fit, minmax())",{"path":1917,"title":1918},"\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":1920,"title":1921},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fgrid-auto-flow-dense-packing","grid-auto-flow: dense for Packed Layouts",{"path":1923,"title":1924},"\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":1926,"title":1927},"\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":1929,"title":1930},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts","CSS Grid and Subgrid Layouts for Responsive Interfaces",{"path":1932,"title":1933},"\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":1935,"title":1936},"\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":1938,"title":1939},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fsubgrid-vs-nested-grid","Subgrid vs an Independently Nested Grid",{"path":1941,"title":1942},"\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":1944,"title":1945},"\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":1947,"title":1948},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-grow-and-flex-shrink-explained","flex-grow and flex-shrink Explained",{"path":1950,"title":1951},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-wrap-intrinsic-responsive-rows","Breakpoint-Free Responsive Rows With flex-wrap and flex-basis",{"path":1953,"title":1954},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflexbox-gap-and-spacing","Flexbox gap vs Margins: Spacing Items Without Edge Hacks",{"path":1956,"title":1957},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns","Flexbox Layout Patterns: One-Dimensional Layout for Real Components",{"path":1959,"title":1960},"\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":1962,"title":1963},"\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":1965,"title":1966},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fdebugging-clamp-values","Debugging clamp(): Values That Are Ignored, Stuck or Never Fluid",{"path":1968,"title":1969},"\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":1971,"title":1972},"\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":1974,"title":1975},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-type-accessibility-and-zoom","Fluid Type, Accessibility and Zoom: The vw-Only Trap",{"path":1977,"title":1978},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-typography-without-javascript","Fluid Typography Without JavaScript: A Precision CSS Reference",{"path":1980,"title":1981},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp","Fluid Typography with clamp(): A Practical Guide for Modern CSS",{"path":1983,"title":1984},"\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":1986,"title":31},"\u002Fmastering-container-queries-responsive-layouts",{"path":1988,"title":1989},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Faspect-ratio-for-responsive-media","Using aspect-ratio for Responsive Media and Preventing Layout Shift",{"path":1991,"title":1992},"\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":1994,"title":1995},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques","Intrinsic Sizing Techniques: Modern CSS Layouts for Responsive UI",{"path":1997,"title":1998},"\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":2000,"title":2001},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fmin-max-fit-content-explained","min-content, max-content, and fit-content() Explained",{"path":2003,"title":2004},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fobject-fit-and-object-position","object-fit and object-position: Images That Fit Any Box",{"path":2006,"title":2007},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fpreventing-flex-and-grid-overflow","The min-width: auto Trap in Flex and Grid Layouts",{"path":2009,"title":2010},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-for-reset-and-tokens","Cascade Layers for Reset and Design Tokens",{"path":2012,"title":2013},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-vs-specificity-hacks","Cascade Layers vs Specificity Hacks: Ordering Instead of Escalating",{"path":2015,"title":2016},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcss-scope-for-component-styles","@scope for Component Styles: Short Selectors That Cannot Leak",{"path":2018,"title":2019},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies","Modern CSS Reset Strategies: A Spec-Compliant Foundation",{"path":2021,"title":2022},"\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":2024,"title":2025},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fwriting-a-minimal-modern-reset","Writing a Minimal Modern CSS Reset: Every Line Justified",{"path":2027,"title":2028},"\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":2030,"title":2031},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fempty-and-loading-states-with-has","Empty and Loading States With ()",{"path":2033,"title":2034},"\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":2036,"title":2037},"\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":2039,"title":2040},"\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":2042,"title":2043},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has","Parent-Aware Layouts With :has(): Letting Containers React to Their Contents",{"path":2045,"title":2046},"\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":2048,"title":2049},"\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":2051,"title":2052},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-data-tables","Container Query Data Tables: Reflowing Tables to Cards",{"path":2054,"title":2055},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-sidebar-layouts","Container Query Sidebar Layouts That Travel Between Contexts",{"path":2057,"title":2058},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns","Responsive Component Patterns: Architecture & Implementation",{"path":2060,"title":2061},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-forms-with-container-queries","Responsive Forms with Container Queries: Reflow Without Losing the Wiring",{"path":2063,"title":2064},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-hero-sections-with-container-queries","Responsive Hero Sections With Container Queries",{"path":2066,"title":2067},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-navigation-without-media-queries","Responsive Navigation Without Media Queries Using Container Queries",{"path":2069,"title":2070},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-pricing-tables","Responsive Pricing Tables: Aligned Features, a Clear Recommendation, Any Width",{"path":2072,"title":2073},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Ftabs-that-become-accordions","Tabs That Become an Accordion: One Component, Two Layouts",{"path":2075,"title":2076},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fcss-only-carousel-with-scroll-snap","A CSS-Only Carousel With Scroll Snap",{"path":2078,"title":2079},"\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":2081,"title":2082},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts","Scroll Snap & Overflow Layouts: Designing Components That Scroll on Purpose",{"path":2084,"title":2085},"\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":2087,"title":2088},"\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":2090,"title":2091},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fcombining-size-and-style-queries","Combining Size and Style Container Queries",{"path":2093,"title":2094},"\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":2096,"title":2097},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state","Style Queries and Container State: Token-Driven Component Variants",{"path":2099,"title":2100},"\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":2102,"title":2103},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fstyle-query-component-variants","Component Variants With Style Queries: One Token, Many Looks",{"path":2105,"title":2106},"\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":2108,"title":2109},"\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":2111,"title":2112},"\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":2114,"title":2115},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout","Viewport Units & Mobile Layout: Designing for the Screen You Actually Get",{"path":2117,"title":2118},"\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":2120,"title":2121},"\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":2123,"title":2124},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Fvirtual-keyboard-and-interactive-widget","Layouts That Survive the Virtual Keyboard",{"title":2126,"caption":2127,"height":2128,"html":2129,"css":2130},"Menu with a submenu in the popover stack","Open File, then Share: the submenu opens beside its item and the File menu stays open. Press Escape once to close Share, again to close File.",300,"\n\u003Cbutton class=\"trigger\" type=\"button\" popovertarget=\"file-menu\">File ▾\u003C\u002Fbutton>\n\u003Cdiv id=\"file-menu\" popover>\n  \u003Cbutton type=\"button\">New\u003C\u002Fbutton>\n  \u003Cbutton type=\"button\">Open…\u003C\u002Fbutton>\n  \u003Cbutton class=\"share-trigger\" type=\"button\" popovertarget=\"share-menu\">Share ▸\u003C\u002Fbutton>\n\u003C\u002Fdiv>\n\u003Cdiv id=\"share-menu\" popover>\n  \u003Cbutton type=\"button\">Copy link\u003C\u002Fbutton>\n  \u003Cbutton type=\"button\">Email\u003C\u002Fbutton>\n\u003C\u002Fdiv>","\nbody { place-items: start; padding: 1.5rem; }\n[popover] { margin: 0; padding: 0.35rem; border: 1px solid var(--demo-border); border-radius: 10px; background: var(--demo-bg); color: var(--demo-fg); box-shadow: 0 10px 30px rgb(15 23 42 \u002F 0.15); }\n[popover] button { display: block; inline-size: 100%; min-inline-size: 10rem; padding: 0.45rem 0.7rem; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; text-align: start; }\n[popover] button:hover, [popover] button:focus-visible { background: var(--demo-surface); outline: none; }\n.trigger { font: inherit; padding: 0.45rem 0.9rem; border-radius: 8px; border: 1px solid var(--demo-border); background: var(--demo-surface); color: inherit; }\n.trigger:focus-visible { outline: 2px solid var(--demo-accent); outline-offset: 2px; }\n.trigger { anchor-name: --file; }\n#file-menu { position-anchor: --file; position-area: block-end span-inline-end; }\n.share-trigger { anchor-name: --share; }\n#share-menu { position-anchor: --share; position-area: inline-end span-block-end; position-try-fallbacks: flip-inline; }",1789717748535]