[{"data":1,"prerenderedAt":3214},["ShallowReactive",2],{"page-\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations":3,"content-all-pages":2649,"live-demo:dialog-command-palette":3208},{"id":4,"title":5,"body":6,"description":2629,"extension":2630,"meta":2631,"navigation":915,"path":2645,"seo":2646,"stem":2647,"__hash__":2648},"content\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Findex.md","Dialog & Popover Animations: Motion for the Top Layer",{"type":7,"value":8,"toc":2607},"minimark",[9,13,56,62,104,107,112,145,148,191,293,316,321,337,341,344,449,455,459,465,471,485,495,501,503,507,685,687,691,694,698,761,774,778,1018,1022,1202,1206,1275,1281,1285,1326,1329,1331,1335,1338,1342,2103,2113,2115,2119,2133,2142,2148,2158,2167,2173,2179,2181,2185,2250,2252,2256,2380,2395,2397,2401,2503,2505,2509,2519,2536,2552,2558,2564,2568,2603],[10,11,5],"h1",{"id":12},"dialog-popover-animations-motion-for-the-top-layer",[14,15,16,17,21,22,27,28,31,32,35,36,39,40,43,44,47,48,51,52,55],"p",{},"Modal dialogs, popovers, menus, tooltips and toasts share a problem that ordinary components do not have: they appear from nothing and disappear into nothing. Their hidden state is ",[18,19,20],"code",{},"display: none"," — or absence from the top layer altogether — and for most of CSS's history those states could not be animated at all. The result was an ecosystem of JavaScript libraries that manage mounting, unmounting and timing just to fade a modal in and out. This guide, part of ",[23,24,26],"a",{"href":25},"\u002Fcss-only-micro-interactions-animations\u002F","CSS-Only Micro-Interactions & Animations",", covers the platform features that remove the need: ",[18,29,30],{},"@starting-style",", ",[18,33,34],{},"transition-behavior: allow-discrete",", the ",[18,37,38],{},"overlay"," property and ",[18,41,42],{},"interpolate-size",", applied to the native ",[18,45,46],{},"\u003Cdialog>"," element, the ",[18,49,50],{},"popover"," attribute and their ",[18,53,54],{},"::backdrop",".",[14,57,58],{},[59,60,61],"strong",{},"Prerequisites — this guide assumes you can already:",[63,64,65,78,91,98],"ul",{},[66,67,68,69,72,73,77],"li",{},"Write per-state transitions and understand which state's ",[18,70,71],{},"transition"," applies (see ",[23,74,76],{"href":75},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002F","CSS Transition Fundamentals",").",[66,79,80,81,83,84,87,88,55],{},"Open a ",[18,82,46],{}," with ",[18,85,86],{},"showModal()"," and a popover with ",[18,89,90],{},"popovertarget",[66,92,93,94,55],{},"Position an element against another with ",[23,95,97],{"href":96},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002F","anchor positioning",[66,99,100,101,55],{},"Gate motion with ",[18,102,103],{},"prefers-reduced-motion",[105,106],"hr",{},[108,109,111],"h2",{"id":110},"the-core-concept-discrete-changes-with-a-timeline","The Core Concept: Discrete Changes With a Timeline",[14,113,114,115,118,119,31,122,31,125,128,129,118,132,31,135,31,138,140,141,144],{},"Opening a dialog or popover changes three kinds of property at once. ",[59,116,117],{},"Continuous"," properties — ",[18,120,121],{},"opacity",[18,123,124],{},"scale",[18,126,127],{},"translate",", colours — interpolate smoothly when transitioned. ",[59,130,131],{},"Discrete",[18,133,134],{},"display",[18,136,137],{},"content-visibility",[18,139,38],{}," — have no in-between values; they are either one thing or the other. And the element's ",[59,142,143],{},"first frame"," after becoming rendered has no previous style to transition from, because it was not rendered a frame ago.",[14,146,147],{},"The modern features each solve one of those problems:",[63,149,150,162,169,180],{},[66,151,152,156,157,161],{},[59,153,154],{},[18,155,30],{}," defines the style an element is considered to have ",[158,159,160],"em",{},"before"," its first rendered frame, giving entry transitions a starting point.",[66,163,164,168],{},[59,165,166],{},[18,167,34],{}," lets discrete properties participate in a transition. Instead of flipping at the start, a discrete property flips at the point that keeps the element visible: at the start when becoming visible, at the end when becoming hidden.",[66,170,171,175,176,179],{},[59,172,173],{},[18,174,38],{}," is a browser-controlled property that reflects whether an element is in the top layer. Transitioning it with ",[18,177,178],{},"allow-discrete"," keeps a closing element in the top layer, above the page and with its backdrop, until its exit finishes.",[66,181,182,186,187,190],{},[59,183,184],{},[18,185,42],{}," lets intrinsic sizes such as ",[18,188,189],{},"auto"," participate in interpolation, so disclosure panels can grow to their content height.",[192,193,199,200,199,204,199,208,199,216,199,228,199,234,199,239,199,243,199,247,199,250,199,253,199,257,199,260,199,263,199,266,199,270,199,272,199,274,199,277,199,280,199,284,199,288],"svg",{"viewBox":194,"role":195,"ariaLabel":196,"xmlns":197,"style":198},"0 0 720 340","img","Map of the four features and the problem each solves across an element's show and hide lifecycle","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","width:100%;height:auto;max-width:720px;margin:2rem 0","\n  ",[201,202,203],"title",{},"Four features across the show and hide lifecycle",[205,206,207],"desc",{},"A horizontal lifecycle from hidden to showing to shown to hiding to hidden. starting-style supplies the from-state at the showing step. allow-discrete defers display at the hiding step. overlay keeps top-layer placement during hiding. interpolate-size lets size animate to auto during showing and hiding.",[209,210,215],"text",{"textAnchor":211,"x":212,"y":213,"style":214},"middle","360","26","text-anchor:middle;fill:currentColor;font:700 17px sans-serif","What each feature fixes, and when",[217,218],"rect",{"x":219,"y":220,"width":221,"height":222,"rx":223,"fill":224,"stroke":225,"strokeWidth":226,"opacity":227},"20","56","120","44","8","none","currentColor","1.5","0.6",[209,229,233],{"textAnchor":211,"x":230,"y":231,"style":232},"80","83","text-anchor:middle;fill:currentColor;font:600 12px sans-serif","hidden",[217,235],{"x":236,"y":220,"width":221,"height":222,"rx":223,"fill":237,"opacity":238},"160","#7aa2ff","0.28",[209,240,242],{"textAnchor":211,"x":241,"y":231,"style":232},"220","showing",[217,244],{"x":245,"y":220,"width":221,"height":222,"rx":223,"fill":237,"opacity":246},"300","0.45",[209,248,249],{"textAnchor":211,"x":212,"y":231,"style":232},"shown",[217,251],{"x":252,"y":220,"width":221,"height":222,"rx":223,"fill":237,"opacity":238},"440",[209,254,256],{"textAnchor":211,"x":255,"y":231,"style":232},"500","hiding",[217,258],{"x":259,"y":220,"width":221,"height":222,"rx":223,"fill":224,"stroke":225,"strokeWidth":226,"opacity":227},"580",[209,261,233],{"textAnchor":211,"x":262,"y":231,"style":232},"640",[217,264],{"x":236,"y":265,"width":221,"height":222,"rx":223,"fill":224,"stroke":225,"strokeWidth":226,"opacity":227},"124",[209,267,30],{"textAnchor":211,"x":241,"y":268,"style":269},"151","text-anchor:middle;fill:currentColor;font:11px ui-monospace,monospace",[217,271],{"x":252,"y":265,"width":221,"height":222,"rx":223,"fill":224,"stroke":225,"strokeWidth":226,"opacity":227},[209,273,178],{"textAnchor":211,"x":255,"y":268,"style":269},[217,275],{"x":252,"y":276,"width":221,"height":222,"rx":223,"fill":224,"stroke":225,"strokeWidth":226,"opacity":227},"180",[209,278,38],{"textAnchor":211,"x":255,"y":279,"style":269},"207",[217,281],{"x":236,"y":282,"width":283,"height":222,"rx":223,"fill":224,"stroke":225,"strokeWidth":226,"opacity":227},"236","400",[209,285,287],{"textAnchor":211,"x":212,"y":286,"style":269},"263","interpolate-size (size to and from auto)",[209,289,292],{"textAnchor":211,"x":212,"y":290,"style":291},"316","text-anchor:middle;fill:currentColor;font:12px sans-serif;opacity:0.8","Entry needs a from-state; exit needs discrete properties deferred.",[14,294,295,296,300,301,305,306,310,311,315],{},"The guides in this section apply those features to specific components. ",[23,297,299],{"href":298},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fanimating-dialog-open-and-close\u002F","Animating dialog Open and Close"," covers the modal dialog in both directions. ",[23,302,304],{"href":303},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fpopover-entry-and-exit-transitions\u002F","Popover Menus That Animate From Their Anchor"," adds spatial direction with anchor positioning. ",[23,307,309],{"href":308},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fbackdrop-animations\u002F","Animating ::backdrop"," handles the dimming layer beneath. ",[23,312,314],{"href":313},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Finterpolate-size-for-height-auto-animation\u002F","Animating height: auto With interpolate-size"," solves the long-standing disclosure problem.",[317,318,320],"h3",{"id":319},"why-native-elements-beat-custom-overlays","Why native elements beat custom overlays",[14,322,323,324,327,328,330,331,333,334,55],{},"It is worth being explicit about what these features protect. A modal built from ",[18,325,326],{},"\u003Cdiv>"," elements must reimplement focus trapping, background inertness, Escape to close, scroll locking, focus return, and correct semantics for assistive technology — and each of those has subtle failure modes that libraries have spent years fixing. The native ",[18,329,46],{}," and ",[18,332,50],{}," give all of it for free, correctly, in every modern browser. Until recently teams gave that up to get animation. The features in this guide mean they no longer have to: the recommended architecture is now ",[158,335,336],{},"native element for behaviour, CSS for motion",[317,338,340],{"id":339},"choosing-the-element-before-the-animation","Choosing the element before the animation",[14,342,343],{},"Animation choices follow from the element, and the element follows from behaviour. Picking the wrong one leads to fighting its defaults — a popover that should have been a dialog will never make the page inert, however it is animated.",[192,345,199,348,199,351,199,354,199,357,199,361,199,366,199,372,199,376,199,383,199,388,199,392,199,397,199,402,199,404,199,408,199,413,199,417,199,421,199,426,199,429,199,433,199,436,199,439,199,442,199,445],{"viewBox":346,"role":195,"ariaLabel":347,"xmlns":197,"style":198},"0 0 720 310","Decision tree choosing between modal dialog, non-modal dialog, auto popover, manual popover and details based on whether the page must be blocked and how the overlay closes",[201,349,350],{},"Which native element fits",[205,352,353],{},"If the page must be blocked, use a modal dialog. If content expands in place, use details. Otherwise, if clicking outside should close it, use popover auto; if it should stay until dismissed, use popover manual.",[209,355,356],{"textAnchor":211,"x":212,"y":213,"style":214},"Behaviour first, then motion",[217,358],{"x":241,"y":222,"width":359,"height":360,"rx":223,"fill":224,"stroke":225,"strokeWidth":226,"opacity":227},"280","40",[209,362,365],{"textAnchor":211,"x":212,"y":363,"style":364},"69","text-anchor:middle;fill:currentColor;font:13px sans-serif","Must the page be blocked?",[367,368],"line",{"x1":369,"y1":370,"x2":371,"y2":221,"stroke":225,"strokeWidth":226,"opacity":227},"290","84","150",[367,373],{"x1":374,"y1":370,"x2":375,"y2":221,"stroke":225,"strokeWidth":226,"opacity":227},"430","540",[209,377,382],{"textAnchor":378,"x":379,"y":380,"style":381},"end","210","100","text-anchor:end;fill:currentColor;font:12px sans-serif","yes",[209,384,387],{"textAnchor":385,"x":255,"y":380,"style":386},"start","text-anchor:start;fill:currentColor;font:12px sans-serif","no",[217,389],{"x":360,"y":221,"width":241,"height":390,"rx":223,"fill":237,"opacity":391},"48","0.34",[209,393,396],{"textAnchor":211,"x":371,"y":394,"style":395},"141","text-anchor:middle;fill:currentColor;font:600 12px ui-monospace,monospace","\u003Cdialog> + showModal()",[209,398,401],{"textAnchor":211,"x":371,"y":399,"style":400},"159","text-anchor:middle;fill:currentColor;font:11px sans-serif","inert page, backdrop",[217,403],{"x":283,"y":221,"width":359,"height":360,"rx":223,"fill":224,"stroke":225,"strokeWidth":226,"opacity":227},[209,405,407],{"textAnchor":211,"x":375,"y":406,"style":364},"145","Does it expand in place?",[367,409],{"x1":410,"y1":236,"x2":411,"y2":412,"stroke":225,"strokeWidth":226,"opacity":227},"470","380","200",[367,414],{"x1":415,"y1":236,"x2":416,"y2":412,"stroke":225,"strokeWidth":226,"opacity":227},"610","620",[209,418,382],{"textAnchor":378,"x":419,"y":420,"style":381},"418","178",[209,422,425],{"textAnchor":385,"x":423,"y":424,"style":386},"624","182","no, overlays",[217,427],{"x":369,"y":412,"width":276,"height":390,"rx":223,"fill":237,"opacity":428},"0.22",[209,430,432],{"textAnchor":211,"x":411,"y":431,"style":395},"221","\u003Cdetails>",[209,434,42],{"textAnchor":211,"x":411,"y":435,"style":400},"239",[217,437],{"x":438,"y":412,"width":379,"height":390,"rx":223,"fill":237,"opacity":428},"490",[209,440,50],{"textAnchor":211,"x":441,"y":431,"style":395},"595",[209,443,444],{"textAnchor":211,"x":441,"y":435,"style":400},"auto: light dismiss · manual: toasts",[209,446,448],{"textAnchor":211,"x":212,"y":447,"style":291},"288","Each element brings its own behaviour; the same motion recipe then applies to all of them.",[14,450,451,452,454],{},"Modal dialogs are for decisions that must be made before continuing: confirmations, required forms, destructive actions. Auto popovers are for transient, dismissible UI anchored to something: menus, pickers, rich tooltips. Manual popovers are for UI that should persist until explicitly closed: toasts, coach marks, non-blocking panels. And ",[18,453,432],{}," is for content that expands in the document flow rather than overlaying it. Once that choice is made, the animation recipe on each is nearly identical — which is the payoff of learning the underlying features instead of per-component tricks.",[108,456,458],{"id":457},"integration-with-adjacent-css","Integration With Adjacent CSS",[14,460,461,464],{},[59,462,463],{},"Anchor positioning."," Popovers are in the top layer, so they escape their DOM parent's positioning context. Anchor positioning reattaches them spatially to their trigger, which is what makes directional entry animations meaningful.",[14,466,467,470],{},[59,468,469],{},"Cascade layers."," Overlay styles often need to override component defaults. Putting overlay motion in a dedicated layer, after components, makes that ordering explicit and avoids specificity escalation.",[14,472,473,476,477,481,482,484],{},[59,474,475],{},"Custom properties."," Durations and easings belong in tokens shared with the rest of the motion system, as described in ",[23,478,480],{"href":479},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002F","Easing & Motion Design",". ",[18,483,54],{}," inherits from its element in current engines, so backdrop colours can be tokens set on the dialog.",[14,486,487,490,491,494],{},[59,488,489],{},"View transitions."," For overlays that should morph out of the element that opened them — a card expanding into a full dialog — a same-document view transition can animate between the two states with a shared ",[18,492,493],{},"view-transition-name",", while the dialog provides the modal behaviour.",[14,496,497,500],{},[59,498,499],{},"Container queries."," Content inside a dialog is often laid out with container queries against the dialog's own width, so a dialog that is narrow on phones and wide on desktops can rearrange its form fields without viewport media queries.",[105,502],{},[108,504,506],{"id":505},"syntax-and-parameters","Syntax and Parameters",[508,509,510,526],"table",{},[511,512,513],"thead",{},[514,515,516,520,523],"tr",{},[517,518,519],"th",{},"Feature",[517,521,522],{},"Syntax",[517,524,525],{},"Default \u002F notes",[527,528,529,545,565,578,594,607,623,635,655,670],"tbody",{},[514,530,531,536,542],{},[532,533,534],"td",{},[18,535,30],{},[532,537,538,541],{},[18,539,540],{},"@starting-style { selector { … } }"," or nested in a rule",[532,543,544],{},"Applies only on the first style update after an element becomes rendered",[514,546,547,552,560],{},[532,548,549],{},[18,550,551],{},"transition-behavior",[532,553,554,557,558],{},[18,555,556],{},"normal"," | ",[18,559,178],{},[532,561,562,564],{},[18,563,556],{}," skips discrete properties",[514,566,567,570,575],{},[532,568,569],{},"Shorthand form",[532,571,572],{},[18,573,574],{},"transition: display 200ms allow-discrete",[532,576,577],{},"Keyword can appear per transition item",[514,579,580,584,591],{},[532,581,582],{},[18,583,38],{},[532,585,586,557,588,590],{},[18,587,224],{},[18,589,189],{}," (set by the browser)",[532,592,593],{},"Authors transition it; they cannot set it",[514,595,596,601,604],{},[532,597,598],{},[18,599,600],{},":popover-open",[532,602,603],{},"pseudo-class",[532,605,606],{},"Matches an open popover",[514,608,609,617,620],{},[532,610,611,614,615],{},[18,612,613],{},"[open]"," on ",[18,616,46],{},[532,618,619],{},"attribute",[532,621,622],{},"Present while the dialog is shown",[514,624,625,629,632],{},[532,626,627],{},[18,628,54],{},[532,630,631],{},"pseudo-element",[532,633,634],{},"Exists only while its element is in the top layer",[514,636,637,641,649],{},[532,638,639],{},[18,640,42],{},[532,642,643,557,646],{},[18,644,645],{},"numeric-only",[18,647,648],{},"allow-keywords",[532,650,651,652],{},"Inherited; set on ",[18,653,654],{},":root",[514,656,657,662,667],{},[532,658,659],{},[18,660,661],{},"calc-size()",[532,663,664],{},[18,665,666],{},"calc-size(\u003Cbasis>, \u003Ccalc-sum>)",[532,668,669],{},"Arithmetic on intrinsic sizes; interpolable",[514,671,672,677,679],{},[532,673,674],{},[18,675,676],{},"::details-content",[532,678,631],{},[532,680,681,682,684],{},"The panel of a ",[18,683,432],{}," element",[105,686],{},[108,688,690],{"id":689},"step-by-step-implementation-a-toast-notification","Step-by-Step Implementation: A Toast Notification",[14,692,693],{},"A toast combines entry, automatic exit and the top layer, and makes a compact example of every piece.",[317,695,697],{"id":696},"step-1-a-manual-popover-as-the-container","Step 1: a manual popover as the container",[699,700,705],"pre",{"className":701,"code":702,"language":703,"meta":704,"style":704},"language-html shiki shiki-themes github-light-high-contrast github-dark-high-contrast","\u003Coutput class=\"toast\" id=\"toast\" popover=\"manual\" role=\"status\">Changes saved.\u003C\u002Foutput>\n","html","",[18,706,707],{"__ignoreMap":704},[708,709,711,715,719,723,726,730,733,735,737,740,742,745,748,750,753,756,758],"span",{"class":367,"line":710},1,[708,712,714],{"class":713},"suds8","\u003C",[708,716,718],{"class":717},"sne4z","output",[708,720,722],{"class":721},"s-5SL"," class",[708,724,725],{"class":713},"=",[708,727,729],{"class":728},"sT6z2","\"toast\"",[708,731,732],{"class":721}," id",[708,734,725],{"class":713},[708,736,729],{"class":728},[708,738,739],{"class":721}," popover",[708,741,725],{"class":713},[708,743,744],{"class":728},"\"manual\"",[708,746,747],{"class":721}," role",[708,749,725],{"class":713},[708,751,752],{"class":728},"\"status\"",[708,754,755],{"class":713},">Changes saved.\u003C\u002F",[708,757,718],{"class":717},[708,759,760],{"class":713},">\n",[14,762,763,766,767,330,770,773],{},[18,764,765],{},"popover=\"manual\""," means the toast is not light-dismissed and does not close other popovers, which suits notifications. ",[18,768,769],{},"role=\"status\"",[18,771,772],{},"\u003Coutput>"," make screen readers announce its text politely.",[317,775,777],{"id":776},"step-2-place-it-and-define-the-hidden-state","Step 2: place it and define the hidden state",[699,779,783],{"className":780,"code":781,"language":782,"meta":704,"style":704},"language-css shiki shiki-themes github-light-high-contrast github-dark-high-contrast",".toast {\n  position-area: block-end;        \u002F* bottom centre of the viewport *\u002F\n  margin: 0 0 1.5rem;\n  padding: 0.75rem 1rem;\n  border: 0;\n  border-radius: 10px;\n  background: #0f172a;\n  color: #f8fafc;\n\n  opacity: 0;\n  translate: 0 1rem;\n  transition:\n    opacity 180ms ease-in,\n    translate 180ms ease-in,\n    display 180ms allow-discrete,\n    overlay 180ms allow-discrete;\n}\n","css",[18,784,785,793,812,836,856,868,884,897,910,917,929,945,954,971,985,998,1012],{"__ignoreMap":704},[708,786,787,790],{"class":367,"line":710},[708,788,789],{"class":721},".toast",[708,791,792],{"class":713}," {\n",[708,794,796,799,802,805,808],{"class":367,"line":795},2,[708,797,798],{"class":721},"  position-area",[708,800,801],{"class":713},": ",[708,803,804],{"class":721},"block-end",[708,806,807],{"class":713},";        ",[708,809,811],{"class":810},"sLBg1","\u002F* bottom centre of the viewport *\u002F\n",[708,813,815,818,820,823,826,829,833],{"class":367,"line":814},3,[708,816,817],{"class":721},"  margin",[708,819,801],{"class":713},[708,821,822],{"class":721},"0",[708,824,825],{"class":721}," 0",[708,827,828],{"class":721}," 1.5",[708,830,832],{"class":831},"sHUrx","rem",[708,834,835],{"class":713},";\n",[708,837,839,842,844,847,849,852,854],{"class":367,"line":838},4,[708,840,841],{"class":721},"  padding",[708,843,801],{"class":713},[708,845,846],{"class":721},"0.75",[708,848,832],{"class":831},[708,850,851],{"class":721}," 1",[708,853,832],{"class":831},[708,855,835],{"class":713},[708,857,859,862,864,866],{"class":367,"line":858},5,[708,860,861],{"class":721},"  border",[708,863,801],{"class":713},[708,865,822],{"class":721},[708,867,835],{"class":713},[708,869,871,874,876,879,882],{"class":367,"line":870},6,[708,872,873],{"class":721},"  border-radius",[708,875,801],{"class":713},[708,877,878],{"class":721},"10",[708,880,881],{"class":831},"px",[708,883,835],{"class":713},[708,885,887,890,892,895],{"class":367,"line":886},7,[708,888,889],{"class":721},"  background",[708,891,801],{"class":713},[708,893,894],{"class":721},"#0f172a",[708,896,835],{"class":713},[708,898,900,903,905,908],{"class":367,"line":899},8,[708,901,902],{"class":721},"  color",[708,904,801],{"class":713},[708,906,907],{"class":721},"#f8fafc",[708,909,835],{"class":713},[708,911,913],{"class":367,"line":912},9,[708,914,916],{"emptyLinePlaceholder":915},true,"\n",[708,918,920,923,925,927],{"class":367,"line":919},10,[708,921,922],{"class":721},"  opacity",[708,924,801],{"class":713},[708,926,822],{"class":721},[708,928,835],{"class":713},[708,930,932,935,937,939,941,943],{"class":367,"line":931},11,[708,933,934],{"class":721},"  translate",[708,936,801],{"class":713},[708,938,822],{"class":721},[708,940,851],{"class":721},[708,942,832],{"class":831},[708,944,835],{"class":713},[708,946,948,951],{"class":367,"line":947},12,[708,949,950],{"class":721},"  transition",[708,952,953],{"class":713},":\n",[708,955,957,960,962,965,968],{"class":367,"line":956},13,[708,958,959],{"class":713},"    opacity ",[708,961,276],{"class":721},[708,963,964],{"class":831},"ms",[708,966,967],{"class":721}," ease-in",[708,969,970],{"class":713},",\n",[708,972,974,977,979,981,983],{"class":367,"line":973},14,[708,975,976],{"class":713},"    translate ",[708,978,276],{"class":721},[708,980,964],{"class":831},[708,982,967],{"class":721},[708,984,970],{"class":713},[708,986,988,991,993,995],{"class":367,"line":987},15,[708,989,990],{"class":713},"    display ",[708,992,276],{"class":721},[708,994,964],{"class":831},[708,996,997],{"class":713}," allow-discrete,\n",[708,999,1001,1004,1007,1009],{"class":367,"line":1000},16,[708,1002,1003],{"class":721},"    overlay",[708,1005,1006],{"class":721}," 180",[708,1008,964],{"class":831},[708,1010,1011],{"class":713}," allow-discrete;\n",[708,1013,1015],{"class":367,"line":1014},17,[708,1016,1017],{"class":713},"}\n",[317,1019,1021],{"id":1020},"step-3-define-the-shown-state-and-its-entry","Step 3: define the shown state and its entry",[699,1023,1025],{"className":780,"code":1024,"language":782,"meta":704,"style":704},".toast:popover-open {\n  opacity: 1;\n  translate: 0 0;\n  transition:\n    opacity 260ms cubic-bezier(0.22, 1, 0.36, 1),\n    translate 260ms cubic-bezier(0.22, 1, 0.36, 1),\n    display 260ms allow-discrete,\n    overlay 260ms allow-discrete;\n}\n\n@starting-style {\n  .toast:popover-open { opacity: 0; translate: 0 1rem; }\n}\n",[18,1026,1027,1039,1050,1062,1068,1101,1129,1139,1150,1154,1158,1164,1198],{"__ignoreMap":704},[708,1028,1029,1031,1034,1037],{"class":367,"line":710},[708,1030,789],{"class":721},[708,1032,1033],{"class":713},":",[708,1035,1036],{"class":717},"popover-open",[708,1038,792],{"class":713},[708,1040,1041,1043,1045,1048],{"class":367,"line":795},[708,1042,922],{"class":721},[708,1044,801],{"class":713},[708,1046,1047],{"class":721},"1",[708,1049,835],{"class":713},[708,1051,1052,1054,1056,1058,1060],{"class":367,"line":814},[708,1053,934],{"class":721},[708,1055,801],{"class":713},[708,1057,822],{"class":721},[708,1059,825],{"class":721},[708,1061,835],{"class":713},[708,1063,1064,1066],{"class":367,"line":838},[708,1065,950],{"class":721},[708,1067,953],{"class":713},[708,1069,1070,1072,1075,1077,1080,1083,1085,1087,1089,1091,1094,1096,1098],{"class":367,"line":858},[708,1071,959],{"class":713},[708,1073,1074],{"class":721},"260",[708,1076,964],{"class":831},[708,1078,1079],{"class":721}," cubic-bezier",[708,1081,1082],{"class":713},"(",[708,1084,428],{"class":721},[708,1086,31],{"class":713},[708,1088,1047],{"class":721},[708,1090,31],{"class":713},[708,1092,1093],{"class":721},"0.36",[708,1095,31],{"class":713},[708,1097,1047],{"class":721},[708,1099,1100],{"class":713},"),\n",[708,1102,1103,1105,1107,1109,1111,1113,1115,1117,1119,1121,1123,1125,1127],{"class":367,"line":870},[708,1104,976],{"class":713},[708,1106,1074],{"class":721},[708,1108,964],{"class":831},[708,1110,1079],{"class":721},[708,1112,1082],{"class":713},[708,1114,428],{"class":721},[708,1116,31],{"class":713},[708,1118,1047],{"class":721},[708,1120,31],{"class":713},[708,1122,1093],{"class":721},[708,1124,31],{"class":713},[708,1126,1047],{"class":721},[708,1128,1100],{"class":713},[708,1130,1131,1133,1135,1137],{"class":367,"line":886},[708,1132,990],{"class":713},[708,1134,1074],{"class":721},[708,1136,964],{"class":831},[708,1138,997],{"class":713},[708,1140,1141,1143,1146,1148],{"class":367,"line":899},[708,1142,1003],{"class":721},[708,1144,1145],{"class":721}," 260",[708,1147,964],{"class":831},[708,1149,1011],{"class":713},[708,1151,1152],{"class":367,"line":912},[708,1153,1017],{"class":713},[708,1155,1156],{"class":367,"line":919},[708,1157,916],{"emptyLinePlaceholder":915},[708,1159,1160,1162],{"class":367,"line":931},[708,1161,30],{"class":831},[708,1163,792],{"class":713},[708,1165,1166,1169,1171,1173,1176,1178,1180,1182,1185,1187,1189,1191,1193,1195],{"class":367,"line":947},[708,1167,1168],{"class":721},"  .toast",[708,1170,1033],{"class":713},[708,1172,1036],{"class":717},[708,1174,1175],{"class":713}," { ",[708,1177,121],{"class":721},[708,1179,801],{"class":713},[708,1181,822],{"class":721},[708,1183,1184],{"class":713},"; ",[708,1186,127],{"class":721},[708,1188,801],{"class":713},[708,1190,822],{"class":721},[708,1192,851],{"class":721},[708,1194,832],{"class":831},[708,1196,1197],{"class":713},"; }\n",[708,1199,1200],{"class":367,"line":956},[708,1201,1017],{"class":713},[317,1203,1205],{"id":1204},"step-4-show-and-hide-from-script","Step 4: show and hide from script",[699,1207,1211],{"className":1208,"code":1209,"language":1210,"meta":704,"style":704},"language-js shiki shiki-themes github-light-high-contrast github-dark-high-contrast","const toast = document.getElementById('toast');\ntoast.showPopover();\nsetTimeout(() => toast.hidePopover(), 5000);\n","js",[18,1212,1213,1239,1250],{"__ignoreMap":704},[708,1214,1215,1218,1221,1224,1227,1231,1233,1236],{"class":367,"line":710},[708,1216,1217],{"class":831},"const",[708,1219,1220],{"class":721}," toast",[708,1222,1223],{"class":831}," =",[708,1225,1226],{"class":713}," document.",[708,1228,1230],{"class":1229},"sKwhi","getElementById",[708,1232,1082],{"class":713},[708,1234,1235],{"class":728},"'toast'",[708,1237,1238],{"class":713},");\n",[708,1240,1241,1244,1247],{"class":367,"line":795},[708,1242,1243],{"class":713},"toast.",[708,1245,1246],{"class":1229},"showPopover",[708,1248,1249],{"class":713},"();\n",[708,1251,1252,1255,1258,1261,1264,1267,1270,1273],{"class":367,"line":814},[708,1253,1254],{"class":1229},"setTimeout",[708,1256,1257],{"class":713},"(() ",[708,1259,1260],{"class":831},"=>",[708,1262,1263],{"class":713}," toast.",[708,1265,1266],{"class":1229},"hidePopover",[708,1268,1269],{"class":713},"(), ",[708,1271,1272],{"class":721},"5000",[708,1274,1238],{"class":713},[14,1276,1277,1278,1280],{},"Both calls simply toggle ",[18,1279,600],{},"; the transitions do the rest. No class names, no animation-end listeners and no unmount timing are needed, because the exit is driven entirely by the deferred discrete properties.",[317,1282,1284],{"id":1283},"step-5-respect-reduced-motion","Step 5: respect reduced motion",[699,1286,1288],{"className":780,"code":1287,"language":782,"meta":704,"style":704},"@media (prefers-reduced-motion: reduce) {\n  .toast, .toast:popover-open { translate: 0 0; }\n}\n",[18,1289,1290,1298,1322],{"__ignoreMap":704},[708,1291,1292,1295],{"class":367,"line":710},[708,1293,1294],{"class":831},"@media",[708,1296,1297],{"class":713}," (prefers-reduced-motion: reduce) {\n",[708,1299,1300,1302,1304,1306,1308,1310,1312,1314,1316,1318,1320],{"class":367,"line":795},[708,1301,1168],{"class":721},[708,1303,31],{"class":713},[708,1305,789],{"class":721},[708,1307,1033],{"class":713},[708,1309,1036],{"class":717},[708,1311,1175],{"class":713},[708,1313,127],{"class":721},[708,1315,801],{"class":713},[708,1317,822],{"class":721},[708,1319,825],{"class":721},[708,1321,1197],{"class":713},[708,1323,1324],{"class":367,"line":814},[708,1325,1017],{"class":713},[14,1327,1328],{},"The toast still fades so its arrival is perceptible, but it no longer travels.",[105,1330],{},[108,1332,1334],{"id":1333},"annotated-production-example-a-command-palette","Annotated Production Example: A Command Palette",[14,1336,1337],{},"A command palette — the keyboard-invoked search overlay common in developer tools — uses a modal dialog, a backdrop, a list that changes height as results filter, and a strong expectation of speed. The CSS below handles all of its motion.",[1339,1340],"live-demo",{"name":1341},"dialog-command-palette",[699,1343,1345],{"className":780,"code":1344,"language":782,"meta":704,"style":704},":root { interpolate-size: allow-keywords; }\n\n.palette {\n  width: min(92vw, 36rem);\n  margin-block-start: 12vh;              \u002F* palettes sit high, not centred *\u002F\n  padding: 0;\n  border: 0;\n  border-radius: 14px;\n  background: #ffffff;\n  box-shadow: 0 24px 60px rgb(15 23 42 \u002F 0.35);\n\n  opacity: 0;\n  scale: 0.98;\n  transition:\n    opacity 120ms ease-in,\n    scale 120ms ease-in,\n    display 120ms allow-discrete,\n    overlay 120ms allow-discrete;\n}\n\n.palette[open] {\n  opacity: 1;\n  scale: 1;\n  \u002F* Fast: a palette is a tool, not an event. *\u002F\n  transition:\n    opacity 160ms cubic-bezier(0.22, 1, 0.36, 1),\n    scale 160ms cubic-bezier(0.22, 1, 0.36, 1),\n    display 160ms allow-discrete,\n    overlay 160ms allow-discrete;\n}\n\n@starting-style {\n  .palette[open] { opacity: 0; scale: 0.98; }\n}\n\n.palette::backdrop {\n  background: rgb(15 23 42 \u002F 0);\n  transition: background-color 120ms ease-in, display 120ms allow-discrete, overlay 120ms allow-discrete;\n}\n.palette[open]::backdrop {\n  background: rgb(15 23 42 \u002F 0.35);\n  transition: background-color 160ms ease-out, display 160ms allow-discrete, overlay 160ms allow-discrete;\n}\n@starting-style {\n  .palette[open]::backdrop { background: rgb(15 23 42 \u002F 0); }\n}\n\n\u002F* The results list resizes as the user types; animate it gently. *\u002F\n.palette__results {\n  max-block-size: 50vh;\n  overflow: auto;\n  block-size: auto;\n  transition: block-size 140ms ease-out;\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .palette, .palette[open] { scale: 1; }\n  .palette__results { transition: none; }\n}\n",[18,1346,1347,1358,1362,1369,1396,1415,1425,1435,1448,1459,1500,1504,1514,1526,1532,1544,1557,1567,1579,1584,1589,1603,1614,1625,1631,1638,1667,1696,1707,1719,1724,1729,1736,1765,1770,1775,1783,1807,1839,1844,1860,1883,1913,1918,1925,1962,1967,1972,1978,1986,2001,2013,2025,2042,2047,2052,2059,2082,2098],{"__ignoreMap":704},[708,1348,1349,1351,1353,1355],{"class":367,"line":710},[708,1350,654],{"class":721},[708,1352,1175],{"class":713},[708,1354,42],{"class":721},[708,1356,1357],{"class":713},": allow-keywords; }\n",[708,1359,1360],{"class":367,"line":795},[708,1361,916],{"emptyLinePlaceholder":915},[708,1363,1364,1367],{"class":367,"line":814},[708,1365,1366],{"class":721},".palette",[708,1368,792],{"class":713},[708,1370,1371,1374,1376,1379,1381,1384,1387,1389,1392,1394],{"class":367,"line":838},[708,1372,1373],{"class":721},"  width",[708,1375,801],{"class":713},[708,1377,1378],{"class":721},"min",[708,1380,1082],{"class":713},[708,1382,1383],{"class":721},"92",[708,1385,1386],{"class":831},"vw",[708,1388,31],{"class":713},[708,1390,1391],{"class":721},"36",[708,1393,832],{"class":831},[708,1395,1238],{"class":713},[708,1397,1398,1401,1403,1406,1409,1412],{"class":367,"line":858},[708,1399,1400],{"class":721},"  margin-block-start",[708,1402,801],{"class":713},[708,1404,1405],{"class":721},"12",[708,1407,1408],{"class":831},"vh",[708,1410,1411],{"class":713},";              ",[708,1413,1414],{"class":810},"\u002F* palettes sit high, not centred *\u002F\n",[708,1416,1417,1419,1421,1423],{"class":367,"line":870},[708,1418,841],{"class":721},[708,1420,801],{"class":713},[708,1422,822],{"class":721},[708,1424,835],{"class":713},[708,1426,1427,1429,1431,1433],{"class":367,"line":886},[708,1428,861],{"class":721},[708,1430,801],{"class":713},[708,1432,822],{"class":721},[708,1434,835],{"class":713},[708,1436,1437,1439,1441,1444,1446],{"class":367,"line":899},[708,1438,873],{"class":721},[708,1440,801],{"class":713},[708,1442,1443],{"class":721},"14",[708,1445,881],{"class":831},[708,1447,835],{"class":713},[708,1449,1450,1452,1454,1457],{"class":367,"line":912},[708,1451,889],{"class":721},[708,1453,801],{"class":713},[708,1455,1456],{"class":721},"#ffffff",[708,1458,835],{"class":713},[708,1460,1461,1464,1466,1468,1471,1473,1476,1478,1481,1483,1486,1489,1492,1495,1498],{"class":367,"line":919},[708,1462,1463],{"class":721},"  box-shadow",[708,1465,801],{"class":713},[708,1467,822],{"class":721},[708,1469,1470],{"class":721}," 24",[708,1472,881],{"class":831},[708,1474,1475],{"class":721}," 60",[708,1477,881],{"class":831},[708,1479,1480],{"class":721}," rgb",[708,1482,1082],{"class":713},[708,1484,1485],{"class":721},"15",[708,1487,1488],{"class":721}," 23",[708,1490,1491],{"class":721}," 42",[708,1493,1494],{"class":713}," \u002F ",[708,1496,1497],{"class":721},"0.35",[708,1499,1238],{"class":713},[708,1501,1502],{"class":367,"line":931},[708,1503,916],{"emptyLinePlaceholder":915},[708,1505,1506,1508,1510,1512],{"class":367,"line":947},[708,1507,922],{"class":721},[708,1509,801],{"class":713},[708,1511,822],{"class":721},[708,1513,835],{"class":713},[708,1515,1516,1519,1521,1524],{"class":367,"line":956},[708,1517,1518],{"class":721},"  scale",[708,1520,801],{"class":713},[708,1522,1523],{"class":721},"0.98",[708,1525,835],{"class":713},[708,1527,1528,1530],{"class":367,"line":973},[708,1529,950],{"class":721},[708,1531,953],{"class":713},[708,1533,1534,1536,1538,1540,1542],{"class":367,"line":987},[708,1535,959],{"class":713},[708,1537,221],{"class":721},[708,1539,964],{"class":831},[708,1541,967],{"class":721},[708,1543,970],{"class":713},[708,1545,1546,1549,1551,1553,1555],{"class":367,"line":1000},[708,1547,1548],{"class":713},"    scale ",[708,1550,221],{"class":721},[708,1552,964],{"class":831},[708,1554,967],{"class":721},[708,1556,970],{"class":713},[708,1558,1559,1561,1563,1565],{"class":367,"line":1014},[708,1560,990],{"class":713},[708,1562,221],{"class":721},[708,1564,964],{"class":831},[708,1566,997],{"class":713},[708,1568,1570,1572,1575,1577],{"class":367,"line":1569},18,[708,1571,1003],{"class":721},[708,1573,1574],{"class":721}," 120",[708,1576,964],{"class":831},[708,1578,1011],{"class":713},[708,1580,1582],{"class":367,"line":1581},19,[708,1583,1017],{"class":713},[708,1585,1587],{"class":367,"line":1586},20,[708,1588,916],{"emptyLinePlaceholder":915},[708,1590,1592,1594,1597,1600],{"class":367,"line":1591},21,[708,1593,1366],{"class":721},[708,1595,1596],{"class":713},"[",[708,1598,1599],{"class":721},"open",[708,1601,1602],{"class":713},"] {\n",[708,1604,1606,1608,1610,1612],{"class":367,"line":1605},22,[708,1607,922],{"class":721},[708,1609,801],{"class":713},[708,1611,1047],{"class":721},[708,1613,835],{"class":713},[708,1615,1617,1619,1621,1623],{"class":367,"line":1616},23,[708,1618,1518],{"class":721},[708,1620,801],{"class":713},[708,1622,1047],{"class":721},[708,1624,835],{"class":713},[708,1626,1628],{"class":367,"line":1627},24,[708,1629,1630],{"class":810},"  \u002F* Fast: a palette is a tool, not an event. *\u002F\n",[708,1632,1634,1636],{"class":367,"line":1633},25,[708,1635,950],{"class":721},[708,1637,953],{"class":713},[708,1639,1641,1643,1645,1647,1649,1651,1653,1655,1657,1659,1661,1663,1665],{"class":367,"line":1640},26,[708,1642,959],{"class":713},[708,1644,236],{"class":721},[708,1646,964],{"class":831},[708,1648,1079],{"class":721},[708,1650,1082],{"class":713},[708,1652,428],{"class":721},[708,1654,31],{"class":713},[708,1656,1047],{"class":721},[708,1658,31],{"class":713},[708,1660,1093],{"class":721},[708,1662,31],{"class":713},[708,1664,1047],{"class":721},[708,1666,1100],{"class":713},[708,1668,1670,1672,1674,1676,1678,1680,1682,1684,1686,1688,1690,1692,1694],{"class":367,"line":1669},27,[708,1671,1548],{"class":713},[708,1673,236],{"class":721},[708,1675,964],{"class":831},[708,1677,1079],{"class":721},[708,1679,1082],{"class":713},[708,1681,428],{"class":721},[708,1683,31],{"class":713},[708,1685,1047],{"class":721},[708,1687,31],{"class":713},[708,1689,1093],{"class":721},[708,1691,31],{"class":713},[708,1693,1047],{"class":721},[708,1695,1100],{"class":713},[708,1697,1699,1701,1703,1705],{"class":367,"line":1698},28,[708,1700,990],{"class":713},[708,1702,236],{"class":721},[708,1704,964],{"class":831},[708,1706,997],{"class":713},[708,1708,1710,1712,1715,1717],{"class":367,"line":1709},29,[708,1711,1003],{"class":721},[708,1713,1714],{"class":721}," 160",[708,1716,964],{"class":831},[708,1718,1011],{"class":713},[708,1720,1722],{"class":367,"line":1721},30,[708,1723,1017],{"class":713},[708,1725,1727],{"class":367,"line":1726},31,[708,1728,916],{"emptyLinePlaceholder":915},[708,1730,1732,1734],{"class":367,"line":1731},32,[708,1733,30],{"class":831},[708,1735,792],{"class":713},[708,1737,1739,1742,1744,1746,1749,1751,1753,1755,1757,1759,1761,1763],{"class":367,"line":1738},33,[708,1740,1741],{"class":721},"  .palette",[708,1743,1596],{"class":713},[708,1745,1599],{"class":721},[708,1747,1748],{"class":713},"] { ",[708,1750,121],{"class":721},[708,1752,801],{"class":713},[708,1754,822],{"class":721},[708,1756,1184],{"class":713},[708,1758,124],{"class":721},[708,1760,801],{"class":713},[708,1762,1523],{"class":721},[708,1764,1197],{"class":713},[708,1766,1768],{"class":367,"line":1767},34,[708,1769,1017],{"class":713},[708,1771,1773],{"class":367,"line":1772},35,[708,1774,916],{"emptyLinePlaceholder":915},[708,1776,1778,1781],{"class":367,"line":1777},36,[708,1779,1780],{"class":721},".palette::backdrop",[708,1782,792],{"class":713},[708,1784,1786,1788,1790,1793,1795,1797,1799,1801,1803,1805],{"class":367,"line":1785},37,[708,1787,889],{"class":721},[708,1789,801],{"class":713},[708,1791,1792],{"class":721},"rgb",[708,1794,1082],{"class":713},[708,1796,1485],{"class":721},[708,1798,1488],{"class":721},[708,1800,1491],{"class":721},[708,1802,1494],{"class":713},[708,1804,822],{"class":721},[708,1806,1238],{"class":713},[708,1808,1810,1812,1815,1817,1819,1821,1824,1826,1828,1831,1833,1835,1837],{"class":367,"line":1809},38,[708,1811,950],{"class":721},[708,1813,1814],{"class":713},": background-color ",[708,1816,221],{"class":721},[708,1818,964],{"class":831},[708,1820,967],{"class":721},[708,1822,1823],{"class":713},", display ",[708,1825,221],{"class":721},[708,1827,964],{"class":831},[708,1829,1830],{"class":713}," allow-discrete, ",[708,1832,38],{"class":721},[708,1834,1574],{"class":721},[708,1836,964],{"class":831},[708,1838,1011],{"class":713},[708,1840,1842],{"class":367,"line":1841},39,[708,1843,1017],{"class":713},[708,1845,1847,1849,1851,1853,1856,1858],{"class":367,"line":1846},40,[708,1848,1366],{"class":721},[708,1850,1596],{"class":713},[708,1852,1599],{"class":721},[708,1854,1855],{"class":713},"]",[708,1857,54],{"class":721},[708,1859,792],{"class":713},[708,1861,1863,1865,1867,1869,1871,1873,1875,1877,1879,1881],{"class":367,"line":1862},41,[708,1864,889],{"class":721},[708,1866,801],{"class":713},[708,1868,1792],{"class":721},[708,1870,1082],{"class":713},[708,1872,1485],{"class":721},[708,1874,1488],{"class":721},[708,1876,1491],{"class":721},[708,1878,1494],{"class":713},[708,1880,1497],{"class":721},[708,1882,1238],{"class":713},[708,1884,1886,1888,1890,1892,1894,1897,1899,1901,1903,1905,1907,1909,1911],{"class":367,"line":1885},42,[708,1887,950],{"class":721},[708,1889,1814],{"class":713},[708,1891,236],{"class":721},[708,1893,964],{"class":831},[708,1895,1896],{"class":721}," ease-out",[708,1898,1823],{"class":713},[708,1900,236],{"class":721},[708,1902,964],{"class":831},[708,1904,1830],{"class":713},[708,1906,38],{"class":721},[708,1908,1714],{"class":721},[708,1910,964],{"class":831},[708,1912,1011],{"class":713},[708,1914,1916],{"class":367,"line":1915},43,[708,1917,1017],{"class":713},[708,1919,1921,1923],{"class":367,"line":1920},44,[708,1922,30],{"class":831},[708,1924,792],{"class":713},[708,1926,1928,1930,1932,1934,1936,1938,1940,1943,1945,1947,1949,1951,1953,1955,1957,1959],{"class":367,"line":1927},45,[708,1929,1741],{"class":721},[708,1931,1596],{"class":713},[708,1933,1599],{"class":721},[708,1935,1855],{"class":713},[708,1937,54],{"class":721},[708,1939,1175],{"class":713},[708,1941,1942],{"class":721},"background",[708,1944,801],{"class":713},[708,1946,1792],{"class":721},[708,1948,1082],{"class":713},[708,1950,1485],{"class":721},[708,1952,1488],{"class":721},[708,1954,1491],{"class":721},[708,1956,1494],{"class":713},[708,1958,822],{"class":721},[708,1960,1961],{"class":713},"); }\n",[708,1963,1965],{"class":367,"line":1964},46,[708,1966,1017],{"class":713},[708,1968,1970],{"class":367,"line":1969},47,[708,1971,916],{"emptyLinePlaceholder":915},[708,1973,1975],{"class":367,"line":1974},48,[708,1976,1977],{"class":810},"\u002F* The results list resizes as the user types; animate it gently. *\u002F\n",[708,1979,1981,1984],{"class":367,"line":1980},49,[708,1982,1983],{"class":721},".palette__results",[708,1985,792],{"class":713},[708,1987,1989,1992,1994,1997,1999],{"class":367,"line":1988},50,[708,1990,1991],{"class":721},"  max-block-size",[708,1993,801],{"class":713},[708,1995,1996],{"class":721},"50",[708,1998,1408],{"class":831},[708,2000,835],{"class":713},[708,2002,2004,2007,2009,2011],{"class":367,"line":2003},51,[708,2005,2006],{"class":721},"  overflow",[708,2008,801],{"class":713},[708,2010,189],{"class":721},[708,2012,835],{"class":713},[708,2014,2016,2019,2021,2023],{"class":367,"line":2015},52,[708,2017,2018],{"class":721},"  block-size",[708,2020,801],{"class":713},[708,2022,189],{"class":721},[708,2024,835],{"class":713},[708,2026,2028,2030,2033,2036,2038,2040],{"class":367,"line":2027},53,[708,2029,950],{"class":721},[708,2031,2032],{"class":713},": block-size ",[708,2034,2035],{"class":721},"140",[708,2037,964],{"class":831},[708,2039,1896],{"class":721},[708,2041,835],{"class":713},[708,2043,2045],{"class":367,"line":2044},54,[708,2046,1017],{"class":713},[708,2048,2050],{"class":367,"line":2049},55,[708,2051,916],{"emptyLinePlaceholder":915},[708,2053,2055,2057],{"class":367,"line":2054},56,[708,2056,1294],{"class":831},[708,2058,1297],{"class":713},[708,2060,2062,2064,2066,2068,2070,2072,2074,2076,2078,2080],{"class":367,"line":2061},57,[708,2063,1741],{"class":721},[708,2065,31],{"class":713},[708,2067,1366],{"class":721},[708,2069,1596],{"class":713},[708,2071,1599],{"class":721},[708,2073,1748],{"class":713},[708,2075,124],{"class":721},[708,2077,801],{"class":713},[708,2079,1047],{"class":721},[708,2081,1197],{"class":713},[708,2083,2085,2088,2090,2092,2094,2096],{"class":367,"line":2084},58,[708,2086,2087],{"class":721},"  .palette__results",[708,2089,1175],{"class":713},[708,2091,71],{"class":721},[708,2093,801],{"class":713},[708,2095,224],{"class":721},[708,2097,1197],{"class":713},[708,2099,2101],{"class":367,"line":2100},59,[708,2102,1017],{"class":713},[14,2104,2105,2106,2108,2109,2112],{},"Every duration is short — 120 to 160 milliseconds — because a command palette is summoned many times a day and must feel instant. Compare that with a destructive confirmation dialog, which appears rarely and can afford 240 milliseconds and a more noticeable scale: the right timing depends on how often the overlay appears and how much attention it deserves, not on the element type. The scale change is 2%, just enough to give the palette a sense of arriving without slowing it down. The results list animates its height as filtering changes the number of matches, which stops the dialog from jumping as the user types; with ",[18,2107,42],{}," enabled, ",[18,2110,2111],{},"block-size: auto"," is the target. In browsers without it, the list simply resizes instantly, which is a perfectly acceptable result for a component whose main job is speed.",[105,2114],{},[108,2116,2118],{"id":2117},"performance-and-accessibility-notes","Performance and Accessibility Notes",[14,2120,2121,2124,2125,2128,2129,2132],{},[59,2122,2123],{},"Most of this is cheap."," Opacity, scale and translate transitions on dialogs and popovers run on the compositor. The discrete properties cost nothing per frame; they flip once. The expensive exceptions are ",[18,2126,2127],{},"backdrop-filter"," blurs, especially when their radius animates, and size animations such as ",[18,2130,2131],{},"block-size",", which re-run layout each frame.",[14,2134,2135,2138,2139,2141],{},[59,2136,2137],{},"Behaviour is independent of motion."," Focus moves into a modal dialog, the page becomes inert, and screen readers announce the dialog as soon as ",[18,2140,86],{}," runs, regardless of the visual transition. That is correct and should not be delayed to match the animation.",[14,2143,2144,2147],{},[59,2145,2146],{},"Exits should be short."," A closing overlay that lingers visually after its content has become non-interactive confuses users who try to click it. Keep exits under about 200 milliseconds.",[14,2149,2150,2153,2154,55],{},[59,2151,2152],{},"Reduced motion keeps the fade."," A brief opacity change still communicates that something appeared; removing it entirely can make a dialog's arrival easy to miss. Remove movement, scale and blur, keep a short fade, as described in ",[23,2155,2157],{"href":2156},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fprefers-reduced-motion-recipes\u002F","prefers-reduced-motion Recipes",[14,2159,2160,2163,2164,2166],{},[59,2161,2162],{},"Announcements are separate from animation."," Toasts need ",[18,2165,769],{}," or a live region to be announced; animation cannot substitute for that.",[14,2168,2169,2172],{},[59,2170,2171],{},"Auto-dismiss timing is a content decision."," A toast that disappears after five seconds must be readable in that time by slower readers and screen-reader users, and WCAG 2.2.1 Timing Adjustable asks that time limits can be extended or turned off unless they are essential. Keep important messages until dismissed, or pause the dismissal timer while the toast is hovered or focused. The exit animation should begin only when the timer has genuinely expired, never as a way of hinting that time is running out.",[14,2174,2175,2178],{},[59,2176,2177],{},"Stacking multiple overlays."," Several open popovers or a popover over a dialog are stacked in the top layer in the order they were opened. Each has its own backdrop, and the backdrops accumulate: two dimmed backdrops produce a much darker page. Keep popover backdrops transparent, as recommended in the backdrop guide, so only the modal dialog dims the page however many overlays are open above it.",[105,2180],{},[108,2182,2184],{"id":2183},"devtools-debugging-workflow","DevTools Debugging Workflow",[2186,2187,2188,2200,2209,2224,2238],"ol",{},[66,2189,2190,2193,2194,2196,2197,2199],{},[59,2191,2192],{},"Force the state."," In Chromium's Styles pane, add the ",[18,2195,1599],{}," attribute to a dialog, or toggle ",[18,2198,600],{}," via the element state panel, to inspect the open styles without script.",[66,2201,2202,2205,2206,2208],{},[59,2203,2204],{},"Slow the animation."," Use the Animations panel at 10% speed and open the element. If the first frame already shows the final state, ",[18,2207,30],{}," is missing or its selector does not match the open state.",[66,2210,2211,2214,2215,2217,2218,2220,2221,2223],{},[59,2212,2213],{},"Watch the exit."," Close the element at slow speed. If it vanishes on the first frame, ",[18,2216,134],{}," is missing ",[18,2219,178],{},"; if it fades behind other content or loses its backdrop, ",[18,2222,38],{}," is missing.",[66,2225,2226,2229,2230,2233,2234,2237],{},[59,2227,2228],{},"Inspect the top layer."," Chromium's Elements panel shows a ",[18,2231,2232],{},"#top-layer"," section listing elements currently in the top layer, and marks each with a ",[18,2235,2236],{},"top-layer"," badge, which confirms whether a closing element is still there.",[66,2239,2240,2243,2244,2246,2247,2249],{},[59,2241,2242],{},"Check computed transitions."," In the Computed pane, ",[18,2245,551],{}," should read ",[18,2248,178],{}," for the transition items that include discrete properties.",[105,2251],{},[108,2253,2255],{"id":2254},"browser-compatibility","Browser Compatibility",[508,2257,2258,2273],{},[511,2259,2260],{},[514,2261,2262,2264,2267,2270],{},[517,2263,519],{},[517,2265,2266],{},"Chrome \u002F Edge",[517,2268,2269],{},"Firefox",[517,2271,2272],{},"Safari",[527,2274,2275,2290,2303,2319,2334,2349,2363],{},[514,2276,2277,2281,2284,2287],{},[532,2278,2279],{},[18,2280,30],{},[532,2282,2283],{},"117+",[532,2285,2286],{},"129+",[532,2288,2289],{},"17.5+",[514,2291,2292,2296,2298,2300],{},[532,2293,2294],{},[18,2295,34],{},[532,2297,2283],{},[532,2299,2286],{},[532,2301,2302],{},"17.4+",[514,2304,2305,2310,2313,2316],{},[532,2306,2307,2309],{},[18,2308,50],{}," attribute",[532,2311,2312],{},"114+",[532,2314,2315],{},"125+",[532,2317,2318],{},"17+",[514,2320,2321,2326,2329,2332],{},[532,2322,2323,2325],{},[18,2324,38],{}," property",[532,2327,2328],{},"Chromium only",[532,2330,2331],{},"Not supported",[532,2333,2331],{},[514,2335,2336,2340,2343,2346],{},[532,2337,2338],{},[18,2339,676],{},[532,2341,2342],{},"131+",[532,2344,2345],{},"143+",[532,2347,2348],{},"18.4+",[514,2350,2351,2357,2359,2361],{},[532,2352,2353,1494,2355],{},[18,2354,42],{},[18,2356,661],{},[532,2358,2286],{},[532,2360,2331],{},[532,2362,2331],{},[514,2364,2365,2372,2374,2377],{},[532,2366,2367,2368,2371],{},"Anchor positioning (",[18,2369,2370],{},"anchor-name",")",[532,2373,2315],{},[532,2375,2376],{},"147+",[532,2378,2379],{},"26+",[14,2381,2382,2383,2385,2386,2388,2389,2391,2392,2394],{},"Everything here degrades to instant but fully functional behaviour: without ",[18,2384,30],{}," there is no entry animation, without ",[18,2387,178],{}," the exit snaps, without ",[18,2390,38],{}," the exit briefly loses its backdrop, and without ",[18,2393,42],{}," disclosures open instantly.",[105,2396],{},[108,2398,2400],{"id":2399},"common-pitfalls","Common Pitfalls",[508,2402,2403,2416],{},[511,2404,2405],{},[514,2406,2407,2410,2413],{},[517,2408,2409],{},"Pitfall",[517,2411,2412],{},"Cause",[517,2414,2415],{},"Resolution",[527,2417,2418,2437,2456,2471,2489],{},[514,2419,2420,2423,2429],{},[532,2421,2422],{},"Element pops in with no entry",[532,2424,2425,2426,2428],{},"No ",[18,2427,30],{},", or its selector misses the open state",[532,2430,2431,2432,2434,2435],{},"Nest it for ",[18,2433,613],{}," or ",[18,2436,600],{},[514,2438,2439,2442,2449],{},[532,2440,2441],{},"Exit vanishes instantly",[532,2443,2444,2446,2447],{},[18,2445,134],{}," not transitioned with ",[18,2448,178],{},[532,2450,2451,2452,2455],{},"Add ",[18,2453,2454],{},"display … allow-discrete"," to the base-state transition",[514,2457,2458,2461,2466],{},[532,2459,2460],{},"Closing dialog loses backdrop",[532,2462,2463,2465],{},[18,2464,38],{}," not transitioned",[532,2467,2451,2468],{},[18,2469,2470],{},"overlay … allow-discrete",[514,2472,2473,2476,2480],{},[532,2474,2475],{},"Accordion snaps open",[532,2477,2425,2478],{},[18,2479,42],{},[532,2481,2482,2485,2486],{},[18,2483,2484],{},":root { interpolate-size: allow-keywords; }"," or grid ",[18,2487,2488],{},"0fr → 1fr",[514,2490,2491,2494,2497],{},[532,2492,2493],{},"Unmounted dialog skips its exit",[532,2495,2496],{},"Element removed from the DOM while open",[532,2498,2499,2500],{},"Close first, remove after ",[18,2501,2502],{},"transitionend",[105,2504],{},[108,2506,2508],{"id":2507},"faq","FAQ",[14,2510,2511,2514,2515,2518],{},[59,2512,2513],{},"What is the top layer?","\nA rendering layer above all normal page content, used by modal dialogs, popovers and fullscreen elements. Elements in it are not clipped by ancestors' overflow and ignore ",[18,2516,2517],{},"z-index"," on the page, which is why they can always appear on top without stacking-context workarounds.",[14,2520,2521,2524,2525,2527,2528,330,2530,2532,2533,2535],{},[59,2522,2523],{},"Why are exit animations harder than entry animations for dialogs and popovers?","\nClosing removes the element from rendering and from the top layer immediately. The entry has ",[18,2526,30],{}," to provide a from-state, but the exit needs ",[18,2529,134],{},[18,2531,38],{}," transitioned with ",[18,2534,178],{}," so the element stays rendered and on top until its animation finishes.",[14,2537,2538,2541,2542,2544,2545,2548,2549,2551],{},[59,2539,2540],{},"Do I still need JavaScript to animate a dialog?","\nOnly to open a modal dialog, which requires ",[18,2543,86],{},". The animation itself, closing via a form with ",[18,2546,2547],{},"method=dialog",", Escape handling and focus return are all native. Popovers need no script at all, because ",[18,2550,90],{}," buttons open and close them.",[14,2553,2554,2557],{},[59,2555,2556],{},"Should dialogs and popovers use the same animation?","\nThey can share easing and duration tokens, but their motion should differ in weight. Modal dialogs interrupt the user and can use a slightly longer, more noticeable entry with a dimmed backdrop; popovers are lightweight and should appear quickly from their anchor with no dimming.",[14,2559,2560,2563],{},[59,2561,2562],{},"How should these animations behave with reduced motion?","\nKeep a short opacity fade so the change of state is still perceptible, and remove scale, translate and blur. Because the entry and exit are transitions, setting their durations to near zero in a reduced-motion media query is enough.",[108,2565,2567],{"id":2566},"related","Related",[63,2569,2570,2575,2580,2585,2590,2597],{},[66,2571,2572,2574],{},[23,2573,299],{"href":298}," — the modal dialog in both directions.",[66,2576,2577,2579],{},[23,2578,304],{"href":303}," — directional popover motion.",[66,2581,2582,2584],{},[23,2583,309],{"href":308}," — fades and blurs beneath the top layer.",[66,2586,2587,2589],{},[23,2588,314],{"href":313}," — disclosures that grow to fit.",[66,2591,2592,2596],{},[23,2593,2595],{"href":2594},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fstarting-style-entry-animations\u002F","@starting-style Entry Animations"," — the entry mechanism in general.",[66,2598,2599,2602],{},[23,2600,2601],{"href":96},"Anchor Positioning & Overlays"," — placing popovers against their triggers.",[2604,2605,2606],"style",{},"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 .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 .sLBg1, html code.shiki .sLBg1{--shiki-default:#66707B;--shiki-dark:#BDC4CC}html pre.shiki code .sHUrx, html code.shiki .sHUrx{--shiki-default:#A0111F;--shiki-dark:#FF9492}html pre.shiki code .sKwhi, html code.shiki .sKwhi{--shiki-default:#622CBC;--shiki-dark:#DBB7FF}",{"title":704,"searchDepth":795,"depth":795,"links":2608},[2609,2613,2614,2615,2622,2623,2624,2625,2626,2627,2628],{"id":110,"depth":795,"text":111,"children":2610},[2611,2612],{"id":319,"depth":814,"text":320},{"id":339,"depth":814,"text":340},{"id":457,"depth":795,"text":458},{"id":505,"depth":795,"text":506},{"id":689,"depth":795,"text":690,"children":2616},[2617,2618,2619,2620,2621],{"id":696,"depth":814,"text":697},{"id":776,"depth":814,"text":777},{"id":1020,"depth":814,"text":1021},{"id":1204,"depth":814,"text":1205},{"id":1283,"depth":814,"text":1284},{"id":1333,"depth":795,"text":1334},{"id":2117,"depth":795,"text":2118},{"id":2183,"depth":795,"text":2184},{"id":2254,"depth":795,"text":2255},{"id":2399,"depth":795,"text":2400},{"id":2507,"depth":795,"text":2508},{"id":2566,"depth":795,"text":2567},"Animate top-layer UI without a library: dialogs, popovers and backdrops in both directions with @starting-style, allow-discrete and overlay, plus height: auto.","md",{"pageTitle":2632,"datePublished":2633,"dateModified":2633,"faq":2634},"Dialog and Popover Animations in CSS","2026-09-18",[2635,2637,2639,2641,2643],{"q":2513,"a":2636},"A rendering layer above all normal page content, used by modal dialogs, popovers and fullscreen elements. Elements in it are not clipped by ancestors' overflow and ignore z-index on the page, which is why they can always appear on top without stacking-context workarounds.",{"q":2523,"a":2638},"Closing removes the element from rendering and from the top layer immediately. The entry has @starting-style to provide a from-state, but the exit needs display and overlay transitioned with allow-discrete so the element stays rendered and on top until its animation finishes.",{"q":2540,"a":2640},"Only to open a modal dialog, which requires showModal(). The animation itself, closing via a form with method=dialog, Escape handling and focus return are all native. Popovers need no script at all, because popovertarget buttons open and close them.",{"q":2556,"a":2642},"They can share easing and duration tokens, but their motion should differ in weight. Modal dialogs interrupt the user and can use a slightly longer, more noticeable entry with a dimmed backdrop; popovers are lightweight and should appear quickly from their anchor with no dimming.",{"q":2562,"a":2644},"Keep a short opacity fade so the change of state is still perceptible, and remove scale, translate and blur. Because the entry and exit are transitions, setting their durations to near zero in a reduced-motion media query is enough.","\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations",{"title":5,"description":2629},"css-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Findex","WDK8Z8iy_873YGLOm45ij5aUvPMdN6AHhN64P7PPHRE",[2650,2653,2656,2659,2662,2665,2668,2671,2674,2677,2680,2683,2686,2689,2692,2695,2698,2701,2704,2707,2710,2713,2716,2719,2722,2725,2728,2731,2734,2737,2740,2743,2746,2749,2752,2755,2758,2761,2764,2767,2770,2773,2776,2779,2782,2785,2786,2789,2791,2794,2797,2800,2803,2806,2809,2812,2815,2818,2821,2824,2827,2830,2833,2836,2839,2842,2845,2848,2851,2854,2857,2860,2863,2866,2869,2872,2875,2878,2881,2884,2887,2890,2893,2896,2899,2902,2905,2908,2911,2914,2917,2920,2923,2926,2929,2932,2935,2938,2941,2944,2947,2950,2953,2956,2959,2962,2965,2968,2971,2974,2977,2980,2983,2986,2989,2992,2995,2998,3001,3004,3007,3010,3013,3016,3019,3022,3025,3028,3031,3034,3037,3040,3043,3046,3049,3052,3055,3058,3061,3064,3067,3070,3073,3076,3079,3082,3085,3088,3091,3094,3097,3100,3103,3106,3109,3112,3115,3118,3121,3124,3127,3130,3133,3136,3139,3142,3145,3148,3151,3154,3157,3160,3163,3166,3169,3172,3175,3178,3181,3184,3187,3190,3193,3196,3199,3202,3205],{"path":2651,"title":2652},"\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":2654,"title":2655},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fflashing-content-and-seizure-thresholds","Flashing Content and Seizure Thresholds",{"path":2657,"title":2658},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fforced-colors-mode-and-animations","Forced Colors Mode and Animations",{"path":2660,"title":2661},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations","Accessibility in CSS Animations: Patterns, Specs & Best Practices",{"path":2663,"title":2664},"\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":2666,"title":2667},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fprefers-reduced-motion-recipes","prefers-reduced-motion Recipes: A Reduction for Every Common Effect",{"path":2669,"title":2670},"\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":2672,"title":2673},"\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":2675,"title":2676},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fvestibular-safe-animation-patterns","Vestibular-Safe Animation Patterns: Why Some Motion Makes People Sick",{"path":2678,"title":2679},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fwcag-motion-success-criteria","WCAG Motion Success Criteria: What Each One Actually Requires",{"path":2681,"title":2682},"\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":2684,"title":2685},"\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":2687,"title":2688},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations","Clip-Path & Mask Animations: Animating Visibility Instead of Position",{"path":2690,"title":2691},"\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":2693,"title":2694},"\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":2696,"title":2697},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fanimating-gradients","Animating CSS Gradients: Smooth Colour Motion Without Jumps",{"path":2699,"title":2700},"\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":2702,"title":2703},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions","Color & Theme Transitions: Colour as Part of the Motion System",{"path":2705,"title":2706},"\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":2708,"title":2709},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fsmooth-theme-switching-transitions","Smooth Theme Switching: Crossfades, Circular Reveals and No Flash",{"path":2711,"title":2712},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fcontainer-query-hover-affordances","Container Query Hover Affordances: When Narrow Means Persistent, Not Hidden",{"path":2714,"title":2715},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion","Container-Aware Motion: Animation Sized by the Space a Component Actually Has",{"path":2717,"title":2718},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Flayout-change-animations-at-container-breakpoints","Animating Changes at Container Breakpoints",{"path":2720,"title":2721},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fmotion-driven-by-container-style-queries","Motion Driven by Container Style Queries",{"path":2723,"title":2724},"\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":2726,"title":2727},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fsuppressing-motion-in-small-containers","Suppressing Motion in Small Containers: Deliberately Animating Nothing",{"path":2729,"title":2730},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fcontrolling-css-animations-from-javascript","Controlling CSS Animations From JavaScript",{"path":2732,"title":2733},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api","CSS Animation vs the Web Animations API: A Decision Guide",{"path":2735,"title":2736},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fwaapi-vs-css-for-interruptible-ui","Interruptible UI: CSS Transitions vs WAAPI",{"path":2738,"title":2739},"\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":2741,"title":2742},"\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":2744,"title":2745},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fcustom-property-fallbacks-and-invalid-values","Custom Property Fallbacks and Invalid Values",{"path":2747,"title":2748},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Ffluid-spacing-tokens-driving-transition-durations","Fluid Spacing Tokens That Drive Transition Durations",{"path":2750,"title":2751},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture","CSS Custom Properties Architecture: Scalable Design Systems & Dynamic UI",{"path":2753,"title":2754},"\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":2756,"title":2757},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fscoping-custom-properties-to-components","Scoping Custom Properties to Components",{"path":2759,"title":2760},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fcss-transition-timing-functions","CSS Transition Timing Functions: ease, cubic-bezier(), steps() and linear()",{"path":2762,"title":2763},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals","CSS Transition Fundamentals: Architecture, Performance & Patterns",{"path":2765,"title":2766},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Finterrupted-and-reversing-transitions","Interrupted and Reversing Transitions: What Happens Mid-Flight",{"path":2768,"title":2769},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fstarting-style-entry-animations","@starting-style: Animating an Element's Very First Style Change",{"path":2771,"title":2772},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-delay-choreography","Choreographing Motion With transition-delay",{"path":2774,"title":2775},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-shorthand-and-multiple-properties","The transition Shorthand and Multiple Properties",{"path":2777,"title":2778},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransitioning-display-with-allow-discrete","Transitioning display with transition-behavior: allow-discrete and @starting-style",{"path":2780,"title":2781},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fanimating-dialog-open-and-close","Animating \u003Cdialog> Open and Close: Both Directions, No Library",{"path":2783,"title":2784},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fbackdrop-animations","Animating ::backdrop: Fades and Blurs Behind Dialogs and Popovers",{"path":2645,"title":5},{"path":2787,"title":2788},"\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":2790,"title":304},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fpopover-entry-and-exit-transitions",{"path":2792,"title":2793},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fchoosing-animation-durations","Choosing Animation Durations: How Long Motion Should Last",{"path":2795,"title":2796},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fcubic-bezier-overshoot-and-anticipation","Overshoot and Anticipation With cubic-bezier(): Motion With Character",{"path":2798,"title":2799},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fentry-vs-exit-easing","Entry vs Exit Easing: Different Curves for Arriving and Leaving",{"path":2801,"title":2802},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design","Easing & Motion Design: Making CSS Motion Feel Intentional",{"path":2804,"title":2805},"\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":2807,"title":2808},"\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":2810,"title":2811},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Faccessible-css-only-tooltips","Accessible CSS-Only Tooltips and Hover Cards With  and ",{"path":2813,"title":2814},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fbutton-press-and-active-states","Button Press and  States",{"path":2816,"title":2817},"\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":2819,"title":2820},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Ffocus-within-form-patterns"," Form Patterns: Styling a Group From the Field Inside It",{"path":2822,"title":2823},"\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":2825,"title":2826},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design","Hover & Focus State Design: Spec-Compliant Patterns for Modern UIs",{"path":2828,"title":2829},"\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":2831,"title":2832},"\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":2834,"title":2835},"\u002Fcss-only-micro-interactions-animations","CSS-Only Micro-Interactions & Animations: Architecture, Performance & Implementation",{"path":2837,"title":2838},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fanimation-composition-and-stacking","Stacking Animations With animation-composition",{"path":2840,"title":2841},"\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":2843,"title":2844},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcontainer-query-triggered-keyframe-animations","Container-Query-Triggered Keyframe Animations: Animate Differently per Available Space",{"path":2846,"title":2847},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-accordions-and-disclosure","CSS-Only Accordions and Disclosure Widgets with details and summary",{"path":2849,"title":2850},"\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":2852,"title":2853},"\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":2855,"title":2856},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns","Keyframe Animation Patterns: Spec-Compliant Architectures for Modern UIs",{"path":2858,"title":2859},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fmulti-step-keyframes-and-per-keyframe-easing","Multi-Step Keyframes and Per-Keyframe Easing",{"path":2861,"title":2862},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fstaggered-list-animations-with-custom-properties","Staggered List Animations Using --i Index Custom Properties",{"path":2864,"title":2865},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fanimating-box-shadow-and-filters-cheaply","Animating box-shadow and Filters Cheaply",{"path":2867,"title":2868},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcontain-property-for-animation-performance","The contain Property for Animation Performance",{"path":2870,"title":2871},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcss-triggers-layout-paint-composite","Layout, Paint and Composite: What Triggers What",{"path":2873,"title":2874},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration","Performance & GPU Acceleration in CSS: A Developer’s Blueprint",{"path":2876,"title":2877},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Foptimizing-css-animations-for-60fps","Optimizing CSS Animations for 60fps: Budgeting the Frame",{"path":2879,"title":2880},"\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":2882,"title":2883},"\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":2885,"title":2886},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations","Scroll-Driven Animations: Binding Motion to Scroll Position in Pure CSS",{"path":2888,"title":2889},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-animation-fallbacks","Shipping Scroll-Driven Animations Without Breaking Anything",{"path":2891,"title":2892},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-parallax-effects","Scroll-Driven Parallax Effects in CSS",{"path":2894,"title":2895},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-progress-bar-without-javascript","A Reading Progress Bar Driven by scroll(root)",{"path":2897,"title":2898},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-triggered-reveal-animations","Reveal-on-Scroll with view() and animation-range",{"path":2900,"title":2901},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Ftimeline-scope-for-cross-element-animations","timeline-scope for Cross-Element Animations",{"path":2903,"title":2904},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fview-timeline-and-animation-range","View Timelines and animation-range",{"path":2906,"title":2907},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fcross-document-view-transitions","Cross-Document View Transitions",{"path":2909,"title":2910},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers","View Transitions for CSS Developers: the Pseudo-Element Tree, Snapshots, and Named Elements",{"path":2912,"title":2913},"\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":2915,"title":2916},"\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":2918,"title":2919},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transition-types-and-classes","View Transition Types and Classes",{"path":2921,"title":2922},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-for-list-reordering","View Transitions for List Reordering",{"path":2924,"title":2925},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-with-reduced-motion","Honouring prefers-reduced-motion in View Transitions",{"path":2927,"title":2928},"\u002F","Modern CSS Layouts & Micro-Interactions",{"path":2930,"title":2931},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioned-tooltips","Anchor-Positioned Tooltips: Tethering, Flipping, and Getting the Semantics Right",{"path":2933,"title":2934},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioning-fallbacks","Anchor Positioning Fallbacks: A Graceful Floor for Older Browser Versions",{"path":2936,"title":2937},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-size-for-matching-widths","anchor-size(): Overlays That Match Their Trigger's Size",{"path":2939,"title":2940},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays","CSS Anchor Positioning and Overlays: Tethering Elements Without JavaScript",{"path":2942,"title":2943},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-attribute-and-css-styling","The popover Attribute: Top-Layer Overlays With No JavaScript",{"path":2945,"title":2946},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-light-dismiss-and-stacking","Popover Light Dismiss, Nesting and Stacking",{"path":2948,"title":2949},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fposition-area-grid-explained","position-area: The Anchor Placement Grid",{"path":2951,"title":2952},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fcontainer-query-polyfill-tradeoffs","Container Query Polyfills: What They Cost and When to Skip Them",{"path":2954,"title":2955},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ffeature-detection-with-supports","Feature Detection with @supports: Syntax, Semantics, and the Traps",{"path":2957,"title":2958},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fhandling-container-query-fallbacks-for-older-browsers","Handling Container Query Fallbacks for Older Browsers",{"path":2960,"title":2961},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks","Container Query Fallbacks: Spec-Compliant CSS Strategies for Legacy Browsers",{"path":2963,"title":2964},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fintrinsic-layout-fallbacks-without-queries","Intrinsic Layout Fallbacks: Baselines That Adapt Without Any Query",{"path":2966,"title":2967},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ftesting-fallbacks-without-old-browsers","Testing CSS Fallbacks Without an Old Browser",{"path":2969,"title":2970},"\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":2972,"title":2973},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-query-range-and-logic-operators","Container Query Range Syntax and Logic Operators",{"path":2975,"title":2976},"\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":2978,"title":2979},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-type-size-vs-inline-size","Choosing container-type: inline-size, size, or normal",{"path":2981,"title":2982},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-vs-media-queries-comparison","Container vs Media Queries: Choosing the Right Reference Box",{"path":2984,"title":2985},"\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":2987,"title":2988},"\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":2990,"title":2991},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics","Container Query Syntax Basics",{"path":2993,"title":2994},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fnesting-and-naming-container-queries","Nesting and Naming Container Queries: Targeting the Right Ancestor",{"path":2996,"title":2997},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fauto-fit-minmax-responsive-grids","Responsive Grids with repeat(auto-fit, minmax())",{"path":2999,"title":3000},"\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":3002,"title":3003},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fgrid-auto-flow-dense-packing","grid-auto-flow: dense for Packed Layouts",{"path":3005,"title":3006},"\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":3008,"title":3009},"\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":3011,"title":3012},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts","CSS Grid and Subgrid Layouts for Responsive Interfaces",{"path":3014,"title":3015},"\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":3017,"title":3018},"\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":3020,"title":3021},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fsubgrid-vs-nested-grid","Subgrid vs an Independently Nested Grid",{"path":3023,"title":3024},"\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":3026,"title":3027},"\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":3029,"title":3030},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-grow-and-flex-shrink-explained","flex-grow and flex-shrink Explained",{"path":3032,"title":3033},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-wrap-intrinsic-responsive-rows","Breakpoint-Free Responsive Rows With flex-wrap and flex-basis",{"path":3035,"title":3036},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflexbox-gap-and-spacing","Flexbox gap vs Margins: Spacing Items Without Edge Hacks",{"path":3038,"title":3039},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns","Flexbox Layout Patterns: One-Dimensional Layout for Real Components",{"path":3041,"title":3042},"\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":3044,"title":3045},"\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":3047,"title":3048},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fdebugging-clamp-values","Debugging clamp(): Values That Are Ignored, Stuck or Never Fluid",{"path":3050,"title":3051},"\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":3053,"title":3054},"\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":3056,"title":3057},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-type-accessibility-and-zoom","Fluid Type, Accessibility and Zoom: The vw-Only Trap",{"path":3059,"title":3060},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-typography-without-javascript","Fluid Typography Without JavaScript: A Precision CSS Reference",{"path":3062,"title":3063},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp","Fluid Typography with clamp(): A Practical Guide for Modern CSS",{"path":3065,"title":3066},"\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":3068,"title":3069},"\u002Fmastering-container-queries-responsive-layouts","Mastering Container Queries & Responsive Layouts",{"path":3071,"title":3072},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Faspect-ratio-for-responsive-media","Using aspect-ratio for Responsive Media and Preventing Layout Shift",{"path":3074,"title":3075},"\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":3077,"title":3078},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques","Intrinsic Sizing Techniques: Modern CSS Layouts for Responsive UI",{"path":3080,"title":3081},"\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":3083,"title":3084},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fmin-max-fit-content-explained","min-content, max-content, and fit-content() Explained",{"path":3086,"title":3087},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fobject-fit-and-object-position","object-fit and object-position: Images That Fit Any Box",{"path":3089,"title":3090},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fpreventing-flex-and-grid-overflow","The min-width: auto Trap in Flex and Grid Layouts",{"path":3092,"title":3093},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-for-reset-and-tokens","Cascade Layers for Reset and Design Tokens",{"path":3095,"title":3096},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-vs-specificity-hacks","Cascade Layers vs Specificity Hacks: Ordering Instead of Escalating",{"path":3098,"title":3099},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcss-scope-for-component-styles","@scope for Component Styles: Short Selectors That Cannot Leak",{"path":3101,"title":3102},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies","Modern CSS Reset Strategies: A Spec-Compliant Foundation",{"path":3104,"title":3105},"\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":3107,"title":3108},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fwriting-a-minimal-modern-reset","Writing a Minimal Modern CSS Reset: Every Line Justified",{"path":3110,"title":3111},"\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":3113,"title":3114},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fempty-and-loading-states-with-has","Empty and Loading States With ()",{"path":3116,"title":3117},"\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":3119,"title":3120},"\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":3122,"title":3123},"\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":3125,"title":3126},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has","Parent-Aware Layouts With :has(): Letting Containers React to Their Contents",{"path":3128,"title":3129},"\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":3131,"title":3132},"\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":3134,"title":3135},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-data-tables","Container Query Data Tables: Reflowing Tables to Cards",{"path":3137,"title":3138},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-sidebar-layouts","Container Query Sidebar Layouts That Travel Between Contexts",{"path":3140,"title":3141},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns","Responsive Component Patterns: Architecture & Implementation",{"path":3143,"title":3144},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-forms-with-container-queries","Responsive Forms with Container Queries: Reflow Without Losing the Wiring",{"path":3146,"title":3147},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-hero-sections-with-container-queries","Responsive Hero Sections With Container Queries",{"path":3149,"title":3150},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-navigation-without-media-queries","Responsive Navigation Without Media Queries Using Container Queries",{"path":3152,"title":3153},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-pricing-tables","Responsive Pricing Tables: Aligned Features, a Clear Recommendation, Any Width",{"path":3155,"title":3156},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Ftabs-that-become-accordions","Tabs That Become an Accordion: One Component, Two Layouts",{"path":3158,"title":3159},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fcss-only-carousel-with-scroll-snap","A CSS-Only Carousel With Scroll Snap",{"path":3161,"title":3162},"\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":3164,"title":3165},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts","Scroll Snap & Overflow Layouts: Designing Components That Scroll on Purpose",{"path":3167,"title":3168},"\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":3170,"title":3171},"\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":3173,"title":3174},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fcombining-size-and-style-queries","Combining Size and Style Container Queries",{"path":3176,"title":3177},"\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":3179,"title":3180},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state","Style Queries and Container State: Token-Driven Component Variants",{"path":3182,"title":3183},"\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":3185,"title":3186},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fstyle-query-component-variants","Component Variants With Style Queries: One Token, Many Looks",{"path":3188,"title":3189},"\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":3191,"title":3192},"\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":3194,"title":3195},"\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":3197,"title":3198},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout","Viewport Units & Mobile Layout: Designing for the Screen You Actually Get",{"path":3200,"title":3201},"\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":3203,"title":3204},"\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":3206,"title":3207},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Fvirtual-keyboard-and-interactive-widget","Layouts That Survive the Virtual Keyboard",{"title":3209,"caption":3210,"height":3211,"html":3212,"css":3213},"Command palette with fast entry, backdrop and resizing results","Open the palette, then press Escape or click outside: a 160ms entry and 120ms exit, fast enough to feel instant. (Opened here as a popover, since demos run without script.)",340,"\n\u003Cbutton class=\"launch\" type=\"button\" popovertarget=\"palette\">Open command palette\u003C\u002Fbutton>\n\u003Cdiv class=\"palette\" id=\"palette\" popover aria-label=\"Command palette\">\n  \u003Cinput class=\"palette__input\" type=\"text\" placeholder=\"Type a command\" aria-label=\"Command\">\n  \u003Cul class=\"palette__results\">\n    \u003Cli>Open file…\u003C\u002Fli>\n    \u003Cli>Go to symbol…\u003C\u002Fli>\n    \u003Cli>Toggle sidebar\u003C\u002Fli>\n    \u003Cli>Change theme\u003C\u002Fli>\n  \u003C\u002Ful>\n\u003C\u002Fdiv>","\n:root { interpolate-size: allow-keywords; }\nbody { place-items: start center; padding-top: 1rem; }\n.launch { font: inherit; padding: 0.45rem 0.9rem; border-radius: 8px; border: 1px solid var(--demo-border); background: var(--demo-surface); color: inherit; }\n.launch:focus-visible { outline: 2px solid var(--demo-accent); outline-offset: 2px; }\n.palette {\n  width: min(92vw, 30rem);\n  margin-block-start: 3.5rem;\n  padding: 0;\n  border: 0;\n  border-radius: 14px;\n  background: var(--demo-bg);\n  color: var(--demo-fg);\n  box-shadow: 0 24px 60px rgb(15 23 42 \u002F 0.35);\n  opacity: 0;\n  scale: 0.98;\n  transition: opacity 120ms ease-in, scale 120ms ease-in, display 120ms allow-discrete, overlay 120ms allow-discrete;\n}\n.palette:popover-open {\n  opacity: 1;\n  scale: 1;\n  transition: opacity 160ms cubic-bezier(0.22, 1, 0.36, 1), scale 160ms cubic-bezier(0.22, 1, 0.36, 1), display 160ms allow-discrete, overlay 160ms allow-discrete;\n}\n@starting-style { .palette:popover-open { opacity: 0; scale: 0.98; } }\n.palette::backdrop { background: rgb(15 23 42 \u002F 0); transition: background-color 120ms ease-in, display 120ms allow-discrete, overlay 120ms allow-discrete; }\n.palette:popover-open::backdrop { background: rgb(15 23 42 \u002F 0.35); transition: background-color 160ms ease-out, display 160ms allow-discrete, overlay 160ms allow-discrete; }\n@starting-style { .palette:popover-open::backdrop { background: rgb(15 23 42 \u002F 0); } }\n.palette__input { width: 100%; padding: 0.9rem 1rem; border: 0; border-bottom: 1px solid var(--demo-border); background: transparent; color: inherit; font: inherit; }\n.palette__input:focus-visible { outline: 2px solid var(--demo-accent); outline-offset: -2px; }\n.palette__results { margin: 0; padding: 0.4rem; list-style: none; max-block-size: 50vh; overflow: auto; block-size: auto; transition: block-size 140ms ease-out; }\n.palette__results li { padding: 0.45rem 0.6rem; border-radius: 6px; }\n.palette__results li:first-child { background: var(--demo-surface); }\n@media (prefers-reduced-motion: reduce) {\n  .palette, .palette:popover-open { scale: 1; }\n  .palette__results { transition: none; }\n}",1789717745536]