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