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