[{"data":1,"prerenderedAt":2350},["ShallowReactive",2],{"page-\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fmask-image-fade-edges\u002F":3,"content-all-pages":1785,"live-demo:mask-fade-edges":2344},{"id":4,"title":5,"body":6,"description":1764,"extension":1765,"meta":1766,"navigation":372,"path":1781,"seo":1782,"stem":1783,"__hash__":1784},"content\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fmask-image-fade-edges\u002Findex.md","Fading Edges With mask-image: Soft Boundaries That Work on Any Background",{"type":7,"value":8,"toc":1754},"minimark",[9,19,37,42,49,55,153,156,160,163,167,1146,1173,1180,1184,1213,1290,1310,1327,1331,1334,1341,1347,1353,1359,1363,1373,1607,1633,1644,1648,1673,1677,1686,1698,1704,1719,1723,1751],[10,11,13,14,18],"h1",{"id":12},"fading-edges-with-mask-image-soft-boundaries-that-work-on-any-background","Fading Edges With ",[15,16,17],"code",{},"mask-image",": Soft Boundaries That Work on Any Background",[20,21,22,23,25,26,31,32,36],"p",{},"Hard edges tell the reader nothing. A horizontal shelf that ends abruptly at the container edge looks complete; a paragraph clamped to three lines looks like a mistake; a hero image that meets a coloured section with a straight line looks unfinished. A soft fade communicates \"there is more\" or \"this continues\" and blends content into its surroundings. The problem is that the obvious implementation — a gradient overlay in the page colour — breaks the moment the background is an image, a gradient, or a dark theme. This page solves fades with ",[15,24,17],{},", which fades the content itself, and shows how to animate the fade without JavaScript. It is part of ",[27,28,30],"a",{"href":29},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002F","Clip-Path & Mask Animations"," in the ",[27,33,35],{"href":34},"\u002Fcss-only-micro-interactions-animations\u002F","CSS-Only Micro-Interactions & Animations"," guide.",[38,39,41],"h2",{"id":40},"why-a-mask-instead-of-an-overlay","Why a mask instead of an overlay",[20,43,44,45,48],{},"An overlay approach puts a pseudo-element on top of the content with ",[15,46,47],{},"background: linear-gradient(transparent, white)",". On a white page it looks like a fade. On a light-grey card it leaves a white smear. On a dark theme it paints a white band across the content. On a photographic background it is obviously a stripe. Every surface needs its own overlay colour, and every theme switch risks a mismatch.",[20,50,51,52,54],{},"A mask works the other way round. ",[15,53,17],{}," takes an image — usually a gradient — and uses its alpha channel to set the element's own transparency pixel by pixel. Where the mask is opaque, the element shows; where it is transparent, the element disappears and whatever is behind it shows through. Nothing is painted on top, so there is no colour to match.",[56,57,63,64,63,68,63,72,63,80,63,107,63,117,63,124,63,127,63,132,63,137,63,140,63,144,63,147,63,150],"svg",{"viewBox":58,"role":59,"ariaLabel":60,"xmlns":61,"style":62},"0 0 720 300","img","Comparison of a white gradient overlay smearing over a dark background and a mask fading content to reveal the real background","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","width:100%;height:auto;max-width:720px;margin:2rem 0","\n  ",[65,66,67],"title",{},"Overlay versus mask on a dark surface",[69,70,71],"desc",{},"Left, content with a light gradient overlay leaves a pale band on a dark card. Right, content faded with a mask reveals the dark card behind it, with no band.",[73,74,79],"text",{"textAnchor":75,"x":76,"y":77,"style":78},"middle","360","26","text-anchor:middle;fill:currentColor;font:700 17px sans-serif","Same content, same dark card, two techniques",[81,82,83,84,83,98,63],"defs",{},"\n    ",[85,86,90,91,90,95,83],"linearGradient",{"id":87,"x1":88,"x2":88,"y1":88,"y2":89},"mf-overlay","0","1","\n      ",[92,93],"stop",{"offset":88,"stopColor":94,"stopOpacity":88},"#ffffff",[92,96],{"offset":89,"stopColor":94,"stopOpacity":97},"0.85",[85,99,90,101,90,105,83],{"id":100,"x1":88,"x2":88,"y1":88,"y2":89},"mf-mask",[92,102],{"offset":88,"stopColor":103,"stopOpacity":104},"#7aa2ff","0.55",[92,106],{"offset":89,"stopColor":103,"stopOpacity":88},[108,109],"rect",{"x":110,"y":111,"width":112,"height":113,"rx":114,"fill":115,"opacity":116},"40","50","300","190","10","currentColor","0.14",[108,118],{"x":119,"y":120,"width":121,"height":122,"rx":123,"fill":103,"opacity":104},"60","70","260","150","6",[108,125],{"x":119,"y":122,"width":121,"height":120,"fill":126},"url(#mf-overlay)",[73,128,131],{"textAnchor":75,"x":113,"y":129,"style":130},"110","text-anchor:middle;fill:currentColor;font:600 13px sans-serif","content",[73,133,136],{"textAnchor":75,"x":113,"y":134,"style":135},"266","text-anchor:middle;fill:currentColor;font:12px sans-serif","overlay: pale band on dark",[108,138],{"x":139,"y":111,"width":112,"height":113,"rx":114,"fill":115,"opacity":116},"380",[108,141],{"x":142,"y":120,"width":121,"height":143,"fill":103,"opacity":104},"400","80",[108,145],{"x":142,"y":122,"width":121,"height":120,"fill":146},"url(#mf-mask)",[73,148,131],{"textAnchor":75,"x":149,"y":129,"style":130},"530",[73,151,152],{"textAnchor":75,"x":149,"y":134,"style":135},"mask: card shows through",[20,154,155],{},"That property is why masks are the right tool on a site with light and dark themes. The same rule produces a correct fade on both, with no theme-specific overrides.",[38,157,159],{"id":158},"the-complete-implementation","The complete implementation",[20,161,162],{},"The page below uses masks for three common fades: the trailing edge of a horizontal scroller, the bottom of a clamped text block that expands on demand, and the lower edge of a hero image blending into the page.",[164,165],"live-demo",{"name":166},"mask-fade-edges",[168,169,174],"pre",{"className":170,"code":171,"language":172,"meta":173,"style":173},"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>Mask fades\u003C\u002Ftitle>\n\u003Cstyle>\n  body { font: 15px\u002F1.6 system-ui, sans-serif; margin: 1.5rem; background: #0f172a; color: #e2e8f0; }\n\n  \u002F* 1. Trailing-edge fade on a horizontal scroller.\n     The mask is fixed to the scroller's box, so content scrolls under it. *\u002F\n  .shelf {\n    display: flex;\n    gap: 0.75rem;\n    overflow-x: auto;\n    padding-bottom: 0.5rem;\n    mask-image: linear-gradient(to right, #000 calc(100% - 4rem), transparent);\n  }\n  .shelf > * { flex: 0 0 9rem; height: 6rem; border-radius: 8px; background: #6366f1; }\n\n  \u002F* 2. Clamped text that fades out instead of ending mid-word.\n     Opening the details element removes the clamp and the mask. *\u002F\n  .excerpt p {\n    max-height: 5lh;           \u002F* five lines of the current line-height *\u002F\n    overflow: hidden;\n    margin: 0;\n    mask-image: linear-gradient(to bottom, #000 60%, transparent);\n  }\n  .excerpt[open] p {\n    max-height: none;\n    mask-image: none;\n  }\n  .excerpt summary { cursor: pointer; color: #93c5fd; }\n\n  \u002F* 3. Hero image that dissolves into the page background. Two gradients\n     composed with intersect fade the bottom AND both sides at once. *\u002F\n  .hero {\n    height: 12rem;\n    background: linear-gradient(135deg, #f59e0b, #db2777 55%, #4c1d95);\n    mask-image:\n      linear-gradient(to bottom, #000 55%, transparent),\n      linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);\n    mask-composite: intersect;\n  }\n\u003C\u002Fstyle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cdiv class=\"hero\" role=\"img\" aria-label=\"Sunset gradient\">\u003C\u002Fdiv>\n  \u003Cdiv class=\"shelf\" tabindex=\"0\" aria-label=\"Collections\">\u003Cdiv>\u003C\u002Fdiv>\u003Cdiv>\u003C\u002Fdiv>\u003Cdiv>\u003C\u002Fdiv>\u003Cdiv>\u003C\u002Fdiv>\u003Cdiv>\u003C\u002Fdiv>\u003C\u002Fdiv>\n  \u003Cdetails class=\"excerpt\">\n    \u003Csummary>Read the full description\u003C\u002Fsummary>\n    \u003Cp>The old coastal road was built in stages over three decades…\u003C\u002Fp>\n  \u003C\u002Fdetails>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n","html","",[15,175,176,196,216,226,244,269,283,293,367,374,381,387,396,410,425,438,453,506,512,573,578,584,590,601,618,631,643,674,679,697,709,720,725,754,759,765,771,779,794,834,842,869,908,921,926,936,945,955,995,1071,1088,1104,1118,1128,1137],{"__ignoreMap":173},[177,178,181,185,189,193],"span",{"class":179,"line":180},"line",1,[177,182,184],{"class":183},"suds8","\u003C!",[177,186,188],{"class":187},"sne4z","doctype",[177,190,192],{"class":191},"s-5SL"," html",[177,194,195],{"class":183},">\n",[177,197,199,202,204,207,210,214],{"class":179,"line":198},2,[177,200,201],{"class":183},"\u003C",[177,203,172],{"class":187},[177,205,206],{"class":191}," lang",[177,208,209],{"class":183},"=",[177,211,213],{"class":212},"sT6z2","\"en\"",[177,215,195],{"class":183},[177,217,219,221,224],{"class":179,"line":218},3,[177,220,201],{"class":183},[177,222,223],{"class":187},"head",[177,225,195],{"class":183},[177,227,229,231,234,237,239,242],{"class":179,"line":228},4,[177,230,201],{"class":183},[177,232,233],{"class":187},"meta",[177,235,236],{"class":191}," charset",[177,238,209],{"class":183},[177,240,241],{"class":212},"\"utf-8\"",[177,243,195],{"class":183},[177,245,247,249,251,254,256,259,262,264,267],{"class":179,"line":246},5,[177,248,201],{"class":183},[177,250,233],{"class":187},[177,252,253],{"class":191}," name",[177,255,209],{"class":183},[177,257,258],{"class":212},"\"viewport\"",[177,260,261],{"class":191}," content",[177,263,209],{"class":183},[177,265,266],{"class":212},"\"width=device-width, initial-scale=1\"",[177,268,195],{"class":183},[177,270,272,274,276,279,281],{"class":179,"line":271},6,[177,273,201],{"class":183},[177,275,65],{"class":187},[177,277,278],{"class":183},">Mask fades\u003C\u002F",[177,280,65],{"class":187},[177,282,195],{"class":183},[177,284,286,288,291],{"class":179,"line":285},7,[177,287,201],{"class":183},[177,289,290],{"class":187},"style",[177,292,195],{"class":183},[177,294,296,299,302,305,308,311,315,318,321,324,327,330,333,336,338,341,344,346,349,351,354,356,359,361,364],{"class":179,"line":295},8,[177,297,298],{"class":187},"  body",[177,300,301],{"class":183}," { ",[177,303,304],{"class":191},"font",[177,306,307],{"class":183},": ",[177,309,310],{"class":191},"15",[177,312,314],{"class":313},"sHUrx","px",[177,316,317],{"class":183},"\u002F",[177,319,320],{"class":191},"1.6",[177,322,323],{"class":191}," system-ui",[177,325,326],{"class":183},", ",[177,328,329],{"class":191},"sans-serif",[177,331,332],{"class":183},"; ",[177,334,335],{"class":191},"margin",[177,337,307],{"class":183},[177,339,340],{"class":191},"1.5",[177,342,343],{"class":313},"rem",[177,345,332],{"class":183},[177,347,348],{"class":191},"background",[177,350,307],{"class":183},[177,352,353],{"class":191},"#0f172a",[177,355,332],{"class":183},[177,357,358],{"class":191},"color",[177,360,307],{"class":183},[177,362,363],{"class":191},"#e2e8f0",[177,365,366],{"class":183},"; }\n",[177,368,370],{"class":179,"line":369},9,[177,371,373],{"emptyLinePlaceholder":372},true,"\n",[177,375,377],{"class":179,"line":376},10,[177,378,380],{"class":379},"sLBg1","  \u002F* 1. Trailing-edge fade on a horizontal scroller.\n",[177,382,384],{"class":179,"line":383},11,[177,385,386],{"class":379},"     The mask is fixed to the scroller's box, so content scrolls under it. *\u002F\n",[177,388,390,393],{"class":179,"line":389},12,[177,391,392],{"class":191},"  .shelf",[177,394,395],{"class":183}," {\n",[177,397,399,402,404,407],{"class":179,"line":398},13,[177,400,401],{"class":191},"    display",[177,403,307],{"class":183},[177,405,406],{"class":191},"flex",[177,408,409],{"class":183},";\n",[177,411,413,416,418,421,423],{"class":179,"line":412},14,[177,414,415],{"class":191},"    gap",[177,417,307],{"class":183},[177,419,420],{"class":191},"0.75",[177,422,343],{"class":313},[177,424,409],{"class":183},[177,426,428,431,433,436],{"class":179,"line":427},15,[177,429,430],{"class":191},"    overflow-x",[177,432,307],{"class":183},[177,434,435],{"class":191},"auto",[177,437,409],{"class":183},[177,439,441,444,446,449,451],{"class":179,"line":440},16,[177,442,443],{"class":191},"    padding-bottom",[177,445,307],{"class":183},[177,447,448],{"class":191},"0.5",[177,450,343],{"class":313},[177,452,409],{"class":183},[177,454,456,459,461,464,467,470,473,475,478,481,483,486,489,492,495,497,500,503],{"class":179,"line":455},17,[177,457,458],{"class":191},"    mask-image",[177,460,307],{"class":183},[177,462,463],{"class":191},"linear-gradient",[177,465,466],{"class":183},"(",[177,468,469],{"class":313},"to",[177,471,472],{"class":191}," right",[177,474,326],{"class":183},[177,476,477],{"class":191},"#000",[177,479,480],{"class":191}," calc",[177,482,466],{"class":183},[177,484,485],{"class":191},"100",[177,487,488],{"class":313},"%",[177,490,491],{"class":313}," -",[177,493,494],{"class":191}," 4",[177,496,343],{"class":313},[177,498,499],{"class":183},"), ",[177,501,502],{"class":191},"transparent",[177,504,505],{"class":183},");\n",[177,507,509],{"class":179,"line":508},18,[177,510,511],{"class":183},"  }\n",[177,513,515,517,520,523,525,527,529,531,534,537,539,541,544,546,548,550,552,555,557,560,562,564,566,568,571],{"class":179,"line":514},19,[177,516,392],{"class":191},[177,518,519],{"class":313}," >",[177,521,522],{"class":187}," *",[177,524,301],{"class":183},[177,526,406],{"class":191},[177,528,307],{"class":183},[177,530,88],{"class":191},[177,532,533],{"class":191}," 0",[177,535,536],{"class":191}," 9",[177,538,343],{"class":313},[177,540,332],{"class":183},[177,542,543],{"class":191},"height",[177,545,307],{"class":183},[177,547,123],{"class":191},[177,549,343],{"class":313},[177,551,332],{"class":183},[177,553,554],{"class":191},"border-radius",[177,556,307],{"class":183},[177,558,559],{"class":191},"8",[177,561,314],{"class":313},[177,563,332],{"class":183},[177,565,348],{"class":191},[177,567,307],{"class":183},[177,569,570],{"class":191},"#6366f1",[177,572,366],{"class":183},[177,574,576],{"class":179,"line":575},20,[177,577,373],{"emptyLinePlaceholder":372},[177,579,581],{"class":179,"line":580},21,[177,582,583],{"class":379},"  \u002F* 2. Clamped text that fades out instead of ending mid-word.\n",[177,585,587],{"class":179,"line":586},22,[177,588,589],{"class":379},"     Opening the details element removes the clamp and the mask. *\u002F\n",[177,591,593,596,599],{"class":179,"line":592},23,[177,594,595],{"class":191},"  .excerpt",[177,597,598],{"class":187}," p",[177,600,395],{"class":183},[177,602,604,607,609,612,615],{"class":179,"line":603},24,[177,605,606],{"class":191},"    max-height",[177,608,307],{"class":183},[177,610,611],{"class":191},"5",[177,613,614],{"class":183},"lh;           ",[177,616,617],{"class":379},"\u002F* five lines of the current line-height *\u002F\n",[177,619,621,624,626,629],{"class":179,"line":620},25,[177,622,623],{"class":191},"    overflow",[177,625,307],{"class":183},[177,627,628],{"class":191},"hidden",[177,630,409],{"class":183},[177,632,634,637,639,641],{"class":179,"line":633},26,[177,635,636],{"class":191},"    margin",[177,638,307],{"class":183},[177,640,88],{"class":191},[177,642,409],{"class":183},[177,644,646,648,650,652,654,656,659,661,663,666,668,670,672],{"class":179,"line":645},27,[177,647,458],{"class":191},[177,649,307],{"class":183},[177,651,463],{"class":191},[177,653,466],{"class":183},[177,655,469],{"class":313},[177,657,658],{"class":191}," bottom",[177,660,326],{"class":183},[177,662,477],{"class":191},[177,664,665],{"class":191}," 60",[177,667,488],{"class":313},[177,669,326],{"class":183},[177,671,502],{"class":191},[177,673,505],{"class":183},[177,675,677],{"class":179,"line":676},28,[177,678,511],{"class":183},[177,680,682,684,687,690,693,695],{"class":179,"line":681},29,[177,683,595],{"class":191},[177,685,686],{"class":183},"[",[177,688,689],{"class":191},"open",[177,691,692],{"class":183},"] ",[177,694,20],{"class":187},[177,696,395],{"class":183},[177,698,700,702,704,707],{"class":179,"line":699},30,[177,701,606],{"class":191},[177,703,307],{"class":183},[177,705,706],{"class":191},"none",[177,708,409],{"class":183},[177,710,712,714,716,718],{"class":179,"line":711},31,[177,713,458],{"class":191},[177,715,307],{"class":183},[177,717,706],{"class":191},[177,719,409],{"class":183},[177,721,723],{"class":179,"line":722},32,[177,724,511],{"class":183},[177,726,728,730,733,735,738,740,743,745,747,749,752],{"class":179,"line":727},33,[177,729,595],{"class":191},[177,731,732],{"class":187}," summary",[177,734,301],{"class":183},[177,736,737],{"class":191},"cursor",[177,739,307],{"class":183},[177,741,742],{"class":191},"pointer",[177,744,332],{"class":183},[177,746,358],{"class":191},[177,748,307],{"class":183},[177,750,751],{"class":191},"#93c5fd",[177,753,366],{"class":183},[177,755,757],{"class":179,"line":756},34,[177,758,373],{"emptyLinePlaceholder":372},[177,760,762],{"class":179,"line":761},35,[177,763,764],{"class":379},"  \u002F* 3. Hero image that dissolves into the page background. Two gradients\n",[177,766,768],{"class":179,"line":767},36,[177,769,770],{"class":379},"     composed with intersect fade the bottom AND both sides at once. *\u002F\n",[177,772,774,777],{"class":179,"line":773},37,[177,775,776],{"class":191},"  .hero",[177,778,395],{"class":183},[177,780,782,785,787,790,792],{"class":179,"line":781},38,[177,783,784],{"class":191},"    height",[177,786,307],{"class":183},[177,788,789],{"class":191},"12",[177,791,343],{"class":313},[177,793,409],{"class":183},[177,795,797,800,802,804,806,809,812,814,817,819,822,825,827,829,832],{"class":179,"line":796},39,[177,798,799],{"class":191},"    background",[177,801,307],{"class":183},[177,803,463],{"class":191},[177,805,466],{"class":183},[177,807,808],{"class":191},"135",[177,810,811],{"class":313},"deg",[177,813,326],{"class":183},[177,815,816],{"class":191},"#f59e0b",[177,818,326],{"class":183},[177,820,821],{"class":191},"#db2777",[177,823,824],{"class":191}," 55",[177,826,488],{"class":313},[177,828,326],{"class":183},[177,830,831],{"class":191},"#4c1d95",[177,833,505],{"class":183},[177,835,837,839],{"class":179,"line":836},40,[177,838,458],{"class":191},[177,840,841],{"class":183},":\n",[177,843,845,848,850,852,854,856,858,860,862,864,866],{"class":179,"line":844},41,[177,846,847],{"class":191},"      linear-gradient",[177,849,466],{"class":183},[177,851,469],{"class":313},[177,853,658],{"class":191},[177,855,326],{"class":183},[177,857,477],{"class":191},[177,859,824],{"class":191},[177,861,488],{"class":313},[177,863,326],{"class":183},[177,865,502],{"class":191},[177,867,868],{"class":183},"),\n",[177,870,872,874,876,878,880,882,884,886,888,891,893,895,897,900,902,904,906],{"class":179,"line":871},42,[177,873,847],{"class":191},[177,875,466],{"class":183},[177,877,469],{"class":313},[177,879,472],{"class":191},[177,881,326],{"class":183},[177,883,502],{"class":191},[177,885,326],{"class":183},[177,887,477],{"class":191},[177,889,890],{"class":191}," 15",[177,892,488],{"class":313},[177,894,326],{"class":183},[177,896,477],{"class":191},[177,898,899],{"class":191}," 85",[177,901,488],{"class":313},[177,903,326],{"class":183},[177,905,502],{"class":191},[177,907,505],{"class":183},[177,909,911,914,916,919],{"class":179,"line":910},43,[177,912,913],{"class":191},"    mask-composite",[177,915,307],{"class":183},[177,917,918],{"class":191},"intersect",[177,920,409],{"class":183},[177,922,924],{"class":179,"line":923},44,[177,925,511],{"class":183},[177,927,929,932,934],{"class":179,"line":928},45,[177,930,931],{"class":183},"\u003C\u002F",[177,933,290],{"class":187},[177,935,195],{"class":183},[177,937,939,941,943],{"class":179,"line":938},46,[177,940,931],{"class":183},[177,942,223],{"class":187},[177,944,195],{"class":183},[177,946,948,950,953],{"class":179,"line":947},47,[177,949,201],{"class":183},[177,951,952],{"class":187},"body",[177,954,195],{"class":183},[177,956,958,961,964,967,969,972,975,977,980,983,985,988,991,993],{"class":179,"line":957},48,[177,959,960],{"class":183},"  \u003C",[177,962,963],{"class":187},"div",[177,965,966],{"class":191}," class",[177,968,209],{"class":183},[177,970,971],{"class":212},"\"hero\"",[177,973,974],{"class":191}," role",[177,976,209],{"class":183},[177,978,979],{"class":212},"\"img\"",[177,981,982],{"class":191}," aria-label",[177,984,209],{"class":183},[177,986,987],{"class":212},"\"Sunset gradient\"",[177,989,990],{"class":183},">\u003C\u002F",[177,992,963],{"class":187},[177,994,195],{"class":183},[177,996,998,1000,1002,1004,1006,1009,1012,1014,1017,1019,1021,1024,1027,1029,1031,1033,1035,1037,1039,1041,1043,1045,1047,1049,1051,1053,1055,1057,1059,1061,1063,1065,1067,1069],{"class":179,"line":997},49,[177,999,960],{"class":183},[177,1001,963],{"class":187},[177,1003,966],{"class":191},[177,1005,209],{"class":183},[177,1007,1008],{"class":212},"\"shelf\"",[177,1010,1011],{"class":191}," tabindex",[177,1013,209],{"class":183},[177,1015,1016],{"class":212},"\"0\"",[177,1018,982],{"class":191},[177,1020,209],{"class":183},[177,1022,1023],{"class":212},"\"Collections\"",[177,1025,1026],{"class":183},">\u003C",[177,1028,963],{"class":187},[177,1030,990],{"class":183},[177,1032,963],{"class":187},[177,1034,1026],{"class":183},[177,1036,963],{"class":187},[177,1038,990],{"class":183},[177,1040,963],{"class":187},[177,1042,1026],{"class":183},[177,1044,963],{"class":187},[177,1046,990],{"class":183},[177,1048,963],{"class":187},[177,1050,1026],{"class":183},[177,1052,963],{"class":187},[177,1054,990],{"class":183},[177,1056,963],{"class":187},[177,1058,1026],{"class":183},[177,1060,963],{"class":187},[177,1062,990],{"class":183},[177,1064,963],{"class":187},[177,1066,990],{"class":183},[177,1068,963],{"class":187},[177,1070,195],{"class":183},[177,1072,1074,1076,1079,1081,1083,1086],{"class":179,"line":1073},50,[177,1075,960],{"class":183},[177,1077,1078],{"class":187},"details",[177,1080,966],{"class":191},[177,1082,209],{"class":183},[177,1084,1085],{"class":212},"\"excerpt\"",[177,1087,195],{"class":183},[177,1089,1091,1094,1097,1100,1102],{"class":179,"line":1090},51,[177,1092,1093],{"class":183},"    \u003C",[177,1095,1096],{"class":187},"summary",[177,1098,1099],{"class":183},">Read the full description\u003C\u002F",[177,1101,1096],{"class":187},[177,1103,195],{"class":183},[177,1105,1107,1109,1111,1114,1116],{"class":179,"line":1106},52,[177,1108,1093],{"class":183},[177,1110,20],{"class":187},[177,1112,1113],{"class":183},">The old coastal road was built in stages over three decades…\u003C\u002F",[177,1115,20],{"class":187},[177,1117,195],{"class":183},[177,1119,1121,1124,1126],{"class":179,"line":1120},53,[177,1122,1123],{"class":183},"  \u003C\u002F",[177,1125,1078],{"class":187},[177,1127,195],{"class":183},[177,1129,1131,1133,1135],{"class":179,"line":1130},54,[177,1132,931],{"class":183},[177,1134,952],{"class":187},[177,1136,195],{"class":183},[177,1138,1140,1142,1144],{"class":179,"line":1139},55,[177,1141,931],{"class":183},[177,1143,172],{"class":187},[177,1145,195],{"class":183},[20,1147,1148,1149,1151,1152,1155,1156,1159,1160,1163,1164,1167,1168,1172],{},"Three details matter. The mask colour is irrelevant — ",[15,1150,477],{}," is used by convention, but only alpha counts, so ",[15,1153,1154],{},"black"," and ",[15,1157,1158],{},"white"," produce identical masks. The ",[15,1161,1162],{},"lh"," unit sizes the clamp in lines of the element's own line height, which keeps the fade proportional if the text is zoomed. And the hero uses two mask layers with ",[15,1165,1166],{},"mask-composite: intersect",", so a pixel is visible only where ",[1169,1170,1171],"em",{},"both"," gradients are opaque: faded at the bottom and at each side.",[20,1174,1175,1176,1179],{},"A caution on the excerpt: a ",[15,1177,1178],{},"\u003Cdetails>"," element exposes the full text to screen readers only when open in some engines, and always in others. Here the full text is in the DOM regardless; the mask and height only affect sighted users, who can open the disclosure. That is the correct division — masks must never be the only way content becomes unreadable.",[38,1181,1183],{"id":1182},"the-key-technique-alpha-layers-and-composition","The key technique: alpha, layers and composition",[20,1185,1186,1187,307,1189,326,1191,326,1194,326,1197,326,1200,326,1203,326,1206,1155,1209,1212],{},"A mask is an ordinary CSS image in a layered property, and the longhands mirror ",[15,1188,348],{},[15,1190,17],{},[15,1192,1193],{},"mask-size",[15,1195,1196],{},"mask-position",[15,1198,1199],{},"mask-repeat",[15,1201,1202],{},"mask-origin",[15,1204,1205],{},"mask-clip",[15,1207,1208],{},"mask-mode",[15,1210,1211],{},"mask-composite",". Understanding the layers is what unlocks the more interesting fades.",[56,1214,63,1217,63,1220,63,1223,63,1226,63,1248,63,1253,63,1259,63,1265,63,1269,63,1273,63,1276,63,1279,63,1282,63,1285],{"viewBox":1215,"role":59,"ariaLabel":1216,"xmlns":61,"style":62},"0 0 720 280","Two mask layers, a vertical fade and a horizontal fade, combined with intersect to produce a vignette",[65,1218,1219],{},"Composing two mask layers",[69,1221,1222],{},"A vertical gradient layer fading toward the bottom and a horizontal layer fading at both sides combine with mask-composite intersect into a single mask faded on three edges.",[73,1224,1225],{"textAnchor":75,"x":76,"y":77,"style":78},"Layer A ∩ layer B = visible area",[81,1227,83,1228,83,1236,63],{},[85,1229,90,1231,90,1234,83],{"id":1230,"x1":88,"x2":88,"y1":88,"y2":89},"mf-v",[92,1232],{"offset":104,"stopColor":103,"stopOpacity":1233},"0.8",[92,1235],{"offset":89,"stopColor":103,"stopOpacity":88},[85,1237,90,1239,90,1241,90,1244,90,1246,83],{"id":1238,"x1":88,"x2":89,"y1":88,"y2":88},"mf-h",[92,1240],{"offset":88,"stopColor":103,"stopOpacity":88},[92,1242],{"offset":1243,"stopColor":103,"stopOpacity":1233},"0.15",[92,1245],{"offset":97,"stopColor":103,"stopOpacity":1233},[92,1247],{"offset":89,"stopColor":103,"stopOpacity":88},[108,1249],{"x":110,"y":119,"width":1250,"height":1251,"rx":559,"fill":1252},"170","140","url(#mf-v)",[73,1254,1258],{"textAnchor":75,"x":1255,"y":1256,"style":1257},"125","224","text-anchor:middle;fill:currentColor;font:12px ui-monospace,monospace","to bottom",[73,1260,1264],{"textAnchor":75,"x":1261,"y":1262,"style":1263},"250","136","text-anchor:middle;fill:currentColor;font:700 20px sans-serif","∩",[108,1266],{"x":1267,"y":119,"width":1250,"height":1251,"rx":559,"fill":1268},"290","url(#mf-h)",[73,1270,1272],{"textAnchor":75,"x":1271,"y":1256,"style":1257},"375","to right",[73,1274,209],{"textAnchor":75,"x":1275,"y":1262,"style":1263},"500",[108,1277],{"x":1278,"y":119,"width":122,"height":1251,"rx":559,"fill":1268},"540",[108,1280],{"x":1278,"y":119,"width":122,"height":1251,"rx":559,"fill":1252,"opacity":1281},"0.6",[73,1283,918],{"textAnchor":75,"x":1284,"y":1256,"style":1257},"615",[73,1286,1289],{"textAnchor":75,"x":76,"y":1287,"style":1288},"262","text-anchor:middle;fill:currentColor;font:12px sans-serif;opacity:0.75","add is the default; intersect, subtract and exclude combine layers like set operations.",[20,1291,1292,1294,1295,1298,1299,1301,1302,1305,1306,1309],{},[15,1293,1211],{}," has four values. ",[15,1296,1297],{},"add"," (the default) shows a pixel if any layer is opaque there. ",[15,1300,918],{}," shows it only where all layers are opaque, which is how multi-edge fades are built. ",[15,1303,1304],{},"subtract"," removes the upper layer's area from the lower one, useful for cut-outs. ",[15,1307,1308],{},"exclude"," shows areas covered by exactly one layer. With two gradients and the right operator, most fades a design calls for can be expressed without an image file.",[20,1311,1312,1314,1315,1318,1319,1322,1323,1326],{},[15,1313,1208],{}," decides whether a mask image's alpha or its luminance is used. Gradients and PNGs default to alpha. SVG ",[15,1316,1317],{},"\u003Cmask>"," elements referenced with ",[15,1320,1321],{},"url()"," default to luminance, which is why an SVG mask drawn in black appears to hide everything — in luminance mode black means transparent. Setting ",[15,1324,1325],{},"mask-mode: alpha"," makes it behave like a gradient.",[38,1328,1330],{"id":1329},"fades-that-should-not-exist","Fades that should not exist",[20,1332,1333],{},"Masks are easy to overuse, and a few fades actively hurt.",[20,1335,1336,1340],{},[1337,1338,1339],"strong",{},"Fading text the reader needs to read."," A fade across the last visible line of body copy is fine when a \"read more\" control sits right below it. A fade across text that cannot be expanded simply makes that text harder to read, and faded text has lower contrast than WCAG 1.4.3 allows. Only fade content whose full version is one interaction away.",[20,1342,1343,1346],{},[1337,1344,1345],{},"Fading focus indicators."," A focus ring on an element near a masked edge is masked too, because the mask applies to the whole element including its outline. Keyboard users then tab to a card whose focus ring is invisible. Either keep interactive elements out of the fade zone with padding, or move the mask to a wrapper that does not contain the focusable items' outlines.",[20,1348,1349,1352],{},[1337,1350,1351],{},"Fading that hides the end state."," A trailing fade on a scroller that is already scrolled to its end suggests more content that does not exist. Where that matters, remove the mask at the end of the scroll range — a scroll-driven animation on the mask's stop position can do it without script — or accept a subtle fade that reads as decoration rather than a promise.",[20,1354,1355,1358],{},[1337,1356,1357],{},"Masks on large, frequently repainted elements."," A mask on a full-page container that also has a running animation inside it forces the masked result to be recomposited each frame. Put masks on the smallest element that needs them.",[38,1360,1362],{"id":1361},"variation-an-animated-reveal-with-a-registered-property","Variation: an animated reveal with a registered property",[20,1364,1365,1366,1372],{},"Gradients cannot be animated directly, because an image has no interpolable value. The trick is to lift the moving part into a custom property and register it with ",[27,1367,1369],{"href":1368},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fanimating-custom-properties-with-at-property\u002F",[15,1370,1371],{},"@property"," so the browser knows its type and can interpolate it.",[168,1374,1378],{"className":1375,"code":1376,"language":1377,"meta":173,"style":173},"language-css shiki shiki-themes github-light-high-contrast github-dark-high-contrast","@property --reveal {\n  syntax: \"\u003Cpercentage>\";\n  inherits: false;\n  initial-value: 0%;\n}\n\n\u002F* A wipe-in: the opaque region grows from the left edge. *\u002F\n.wipe {\n  mask-image: linear-gradient(\n    to right,\n    #000 var(--reveal),\n    transparent calc(var(--reveal) + 15%)\n  );\n  animation: wipe-in 0.9s ease-out forwards;\n}\n\n@keyframes wipe-in {\n  to { --reveal: 100%; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .wipe { animation: none; --reveal: 100%; }\n}\n","css",[15,1379,1380,1387,1398,1403,1411,1416,1420,1425,1432,1444,1454,1470,1499,1504,1526,1530,1534,1544,1561,1565,1569,1577,1603],{"__ignoreMap":173},[177,1381,1382,1384],{"class":179,"line":180},[177,1383,1371],{"class":313},[177,1385,1386],{"class":183}," --reveal {\n",[177,1388,1389,1392,1395],{"class":179,"line":198},[177,1390,1391],{"class":183},"  syntax: \"\u003Cpercentage",[177,1393,1394],{"class":313},">",[177,1396,1397],{"class":183},"\";\n",[177,1399,1400],{"class":179,"line":218},[177,1401,1402],{"class":183},"  inherits: false;\n",[177,1404,1405,1408],{"class":179,"line":228},[177,1406,1407],{"class":187},"  initial-value",[177,1409,1410],{"class":183},": 0%;\n",[177,1412,1413],{"class":179,"line":246},[177,1414,1415],{"class":183},"}\n",[177,1417,1418],{"class":179,"line":271},[177,1419,373],{"emptyLinePlaceholder":372},[177,1421,1422],{"class":179,"line":285},[177,1423,1424],{"class":379},"\u002F* A wipe-in: the opaque region grows from the left edge. *\u002F\n",[177,1426,1427,1430],{"class":179,"line":295},[177,1428,1429],{"class":191},".wipe",[177,1431,395],{"class":183},[177,1433,1434,1437,1439,1441],{"class":179,"line":369},[177,1435,1436],{"class":191},"  mask-image",[177,1438,307],{"class":183},[177,1440,463],{"class":191},[177,1442,1443],{"class":183},"(\n",[177,1445,1446,1449,1451],{"class":179,"line":376},[177,1447,1448],{"class":313},"    to",[177,1450,472],{"class":191},[177,1452,1453],{"class":183},",\n",[177,1455,1456,1459,1462,1464,1468],{"class":179,"line":383},[177,1457,1458],{"class":191},"    #000",[177,1460,1461],{"class":191}," var",[177,1463,466],{"class":183},[177,1465,1467],{"class":1466},"soyes","--reveal",[177,1469,868],{"class":183},[177,1471,1472,1475,1477,1479,1482,1484,1486,1489,1492,1494,1496],{"class":179,"line":389},[177,1473,1474],{"class":191},"    transparent",[177,1476,480],{"class":191},[177,1478,466],{"class":183},[177,1480,1481],{"class":191},"var",[177,1483,466],{"class":183},[177,1485,1467],{"class":1466},[177,1487,1488],{"class":183},") ",[177,1490,1491],{"class":313},"+",[177,1493,890],{"class":191},[177,1495,488],{"class":313},[177,1497,1498],{"class":183},")\n",[177,1500,1501],{"class":179,"line":398},[177,1502,1503],{"class":183},"  );\n",[177,1505,1506,1509,1512,1515,1518,1521,1524],{"class":179,"line":412},[177,1507,1508],{"class":191},"  animation",[177,1510,1511],{"class":183},": wipe-in ",[177,1513,1514],{"class":191},"0.9",[177,1516,1517],{"class":313},"s",[177,1519,1520],{"class":191}," ease-out",[177,1522,1523],{"class":191}," forwards",[177,1525,409],{"class":183},[177,1527,1528],{"class":179,"line":427},[177,1529,1415],{"class":183},[177,1531,1532],{"class":179,"line":440},[177,1533,373],{"emptyLinePlaceholder":372},[177,1535,1536,1539,1542],{"class":179,"line":455},[177,1537,1538],{"class":313},"@keyframes",[177,1540,1541],{"class":1466}," wipe-in",[177,1543,395],{"class":183},[177,1545,1546,1549,1551,1553,1555,1557,1559],{"class":179,"line":508},[177,1547,1548],{"class":191},"  to",[177,1550,301],{"class":183},[177,1552,1467],{"class":1466},[177,1554,307],{"class":183},[177,1556,485],{"class":191},[177,1558,488],{"class":313},[177,1560,366],{"class":183},[177,1562,1563],{"class":179,"line":514},[177,1564,1415],{"class":183},[177,1566,1567],{"class":179,"line":575},[177,1568,373],{"emptyLinePlaceholder":372},[177,1570,1571,1574],{"class":179,"line":580},[177,1572,1573],{"class":313},"@media",[177,1575,1576],{"class":183}," (prefers-reduced-motion: reduce) {\n",[177,1578,1579,1582,1584,1587,1589,1591,1593,1595,1597,1599,1601],{"class":179,"line":586},[177,1580,1581],{"class":191},"  .wipe",[177,1583,301],{"class":183},[177,1585,1586],{"class":191},"animation",[177,1588,307],{"class":183},[177,1590,706],{"class":191},[177,1592,332],{"class":183},[177,1594,1467],{"class":1466},[177,1596,307],{"class":183},[177,1598,485],{"class":191},[177,1600,488],{"class":313},[177,1602,366],{"class":183},[177,1604,1605],{"class":179,"line":592},[177,1606,1415],{"class":183},[20,1608,1609,1610,1612,1613,1616,1617,1620,1621,1623,1624,1627,1628,1632],{},"Each frame, the browser interpolates ",[15,1611,1467],{}," from ",[15,1614,1615],{},"0%"," to ",[15,1618,1619],{},"100%",", rebuilds the gradient with the new stop positions, and repaints the mask. The 15% soft edge travels with the reveal, giving a feathered wipe rather than a hard line. Because this repaints, keep it to a one-off entrance on a modest element; for large or repeated effects, animating ",[15,1622,1196],{}," over a fixed oversized gradient is cheaper, since the browser can move a pre-rasterised mask. The hard-edged cousin of this effect, using ",[15,1625,1626],{},"clip-path",", is covered in ",[27,1629,1631],{"href":1630},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fclip-path-reveal-animations\u002F","Clip-Path Reveal Animations",".",[20,1634,1635,1636,1638,1639,1643],{},"The reduced-motion branch sets the final state directly rather than merely removing the animation, which would otherwise leave the element masked at ",[15,1637,1615],{}," — fully invisible. That mistake is common with entrance animations and is one reason the guidance in ",[27,1640,1642],{"href":1641},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fprefers-reduced-motion-recipes\u002F","prefers-reduced-motion Recipes"," recommends always defining the resting state first.",[38,1645,1647],{"id":1646},"browser-support","Browser support",[20,1649,1650,1651,326,1653,1655,1656,1659,1660,1662,1663,1665,1666,1668,1669,1672],{},"Unprefixed ",[15,1652,17],{},[15,1654,1211],{}," and the other mask longhands are supported in current versions of Chrome, Edge, Firefox and Safari; older WebKit and Blink versions needed the ",[15,1657,1658],{},"-webkit-mask-*"," prefix, which is still worth including before the unprefixed property if you support them. ",[15,1661,1371],{},", used for the animated reveal, is supported in Chrome and Edge 85+, Firefox 128+ and Safari 16.4+; without it the custom property still works but snaps to its final value instead of animating. The ",[15,1664,1162],{}," unit is newer; declare a ",[15,1667,343],{},"-based ",[15,1670,1671],{},"max-height"," first as a fallback.",[38,1674,1676],{"id":1675},"faq","FAQ",[20,1678,1679,1685],{},[1337,1680,1681,1682,1684],{},"Why use ",[15,1683,17],{}," instead of a gradient overlay?","\nA gradient overlay paints a colour on top of the content, so it only looks right on a background that exactly matches the overlay colour. A mask makes the content itself transparent, so the fade works on any background, including images, gradients and both light and dark themes.",[20,1687,1688,1694,1695,1697],{},[1337,1689,1690,1691,1693],{},"Can I animate a ",[15,1692,17],{}," gradient?","\nNot directly, because gradients do not interpolate as images. Put the moving part, such as a stop position, in a custom property registered with ",[15,1696,1371],{}," as a length or percentage, and animate or transition the property. The gradient then updates smoothly each frame.",[20,1699,1700,1703],{},[1337,1701,1702],{},"Does a mask hide content from screen readers?","\nNo. Masking is purely visual. Text that is fully masked is still in the accessibility tree and still read aloud, so never use a mask to hide content that should be unavailable; use it only to fade content that is also reachable some other way, such as by scrolling.",[20,1705,1706,1712,1713,1715,1716,1718],{},[1337,1707,1708,1709,1711],{},"Is ",[15,1710,17],{}," expensive to render?","\nA static mask adds a compositing step but is cheap on modern hardware. Animating ",[15,1714,1196],{}," or ",[15,1717,1193],{}," can often be handled by the compositor, while animating a gradient through a custom property repaints the mask each frame, so keep such animations short or confined to small elements.",[38,1720,1722],{"id":1721},"related","Related",[1724,1725,1726,1732,1737,1744],"ul",{},[1727,1728,1729,1731],"li",{},[27,1730,30],{"href":29}," — the parent guide to shape and visibility effects.",[1727,1733,1734,1736],{},[27,1735,1631],{"href":1630}," — hard-edged reveals with clip-path.",[1727,1738,1739,1743],{},[27,1740,1742],{"href":1741},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fanimated-gradient-borders-with-property\u002F","Animated Gradient Borders With @property"," — another registered-property gradient effect.",[1727,1745,1746,1750],{},[27,1747,1749],{"href":1748},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fhorizontal-scrolling-card-rows\u002F","Horizontal Scrolling Card Rows"," — where trailing-edge fades are most useful.",[290,1752,1753],{},"html pre.shiki code .suds8, html code.shiki .suds8{--shiki-default:#0E1116;--shiki-dark:#F0F3F6}html pre.shiki code .sne4z, html code.shiki .sne4z{--shiki-default:#024C1A;--shiki-dark:#72F088}html pre.shiki code .s-5SL, html code.shiki .s-5SL{--shiki-default:#023B95;--shiki-dark:#91CBFF}html pre.shiki code .sT6z2, html code.shiki .sT6z2{--shiki-default:#032563;--shiki-dark:#ADDCFF}html pre.shiki code .sHUrx, html code.shiki .sHUrx{--shiki-default:#A0111F;--shiki-dark:#FF9492}html pre.shiki code .sLBg1, html code.shiki .sLBg1{--shiki-default:#66707B;--shiki-dark:#BDC4CC}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .soyes, html code.shiki .soyes{--shiki-default:#702C00;--shiki-dark:#FFB757}",{"title":173,"searchDepth":198,"depth":198,"links":1755},[1756,1757,1758,1759,1760,1761,1762,1763],{"id":40,"depth":198,"text":41},{"id":158,"depth":198,"text":159},{"id":1182,"depth":198,"text":1183},{"id":1329,"depth":198,"text":1330},{"id":1361,"depth":198,"text":1362},{"id":1646,"depth":198,"text":1647},{"id":1675,"depth":198,"text":1676},{"id":1721,"depth":198,"text":1722},"Fade scrolling edges, truncated text and image borders with mask-image gradients, animate the fade with a registered property, and keep it off the main thread.","md",{"pageTitle":1767,"datePublished":1768,"dateModified":1768,"faq":1769},"Fade Edges With mask-image in CSS","2026-09-18",[1770,1773,1776,1778],{"q":1771,"a":1772},"Why use mask-image instead of a gradient overlay?","A gradient overlay paints a colour on top of the content, so it only looks right on a background that exactly matches the overlay colour. A mask makes the content itself transparent, so the fade works on any background, including images, gradients and both light and dark themes.",{"q":1774,"a":1775},"Can I animate a mask-image gradient?","Not directly, because gradients do not interpolate as images. Put the moving part, such as a stop position, in a custom property registered with @property as a length or percentage, and animate or transition the property. The gradient then updates smoothly each frame.",{"q":1702,"a":1777},"No. Masking is purely visual. Text that is fully masked is still in the accessibility tree and still read aloud, so never use a mask to hide content that should be unavailable; use it only to fade content that is also reachable some other way, such as by scrolling.",{"q":1779,"a":1780},"Is mask-image expensive to render?","A static mask adds a compositing step but is cheap on modern hardware. Animating mask-position or mask-size can often be handled by the compositor, while animating a gradient through a custom property repaints the mask each frame, so keep such animations short or confined to small elements.","\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fmask-image-fade-edges",{"title":5,"description":1764},"css-only-micro-interactions-animations\u002Fclip-path-and-mask-animations\u002Fmask-image-fade-edges\u002Findex","kAO8jj1F-Dbd-ZsWV3PLtKfR1IAYyGMAJlccFFR_2bA",[1786,1789,1792,1795,1798,1801,1804,1807,1810,1813,1816,1819,1822,1825,1826,1829,1832,1835,1838,1841,1844,1847,1850,1853,1856,1859,1862,1865,1868,1871,1874,1877,1880,1883,1886,1889,1892,1895,1898,1901,1904,1907,1910,1913,1916,1919,1922,1925,1928,1931,1934,1937,1940,1943,1946,1949,1952,1955,1958,1961,1964,1967,1970,1973,1976,1979,1982,1985,1988,1991,1994,1997,2000,2003,2006,2009,2012,2015,2018,2021,2024,2027,2030,2033,2036,2039,2042,2045,2048,2051,2054,2057,2060,2063,2065,2068,2071,2074,2077,2080,2083,2086,2089,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,2245,2248,2251,2254,2257,2260,2263,2266,2269,2272,2275,2278,2281,2284,2287,2290,2293,2296,2299,2302,2305,2308,2311,2314,2317,2320,2323,2326,2329,2332,2335,2338,2341],{"path":1787,"title":1788},"\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":1790,"title":1791},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fflashing-content-and-seizure-thresholds","Flashing Content and Seizure Thresholds",{"path":1793,"title":1794},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fforced-colors-mode-and-animations","Forced Colors Mode and Animations",{"path":1796,"title":1797},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations","Accessibility in CSS Animations: Patterns, Specs & Best Practices",{"path":1799,"title":1800},"\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":1802,"title":1803},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fprefers-reduced-motion-recipes","prefers-reduced-motion Recipes: A Reduction for Every Common Effect",{"path":1805,"title":1806},"\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":1808,"title":1809},"\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":1811,"title":1812},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fvestibular-safe-animation-patterns","Vestibular-Safe Animation Patterns: Why Some Motion Makes People Sick",{"path":1814,"title":1815},"\u002Fcss-only-micro-interactions-animations\u002Faccessibility-in-css-animations\u002Fwcag-motion-success-criteria","WCAG Motion Success Criteria: What Each One Actually Requires",{"path":1817,"title":1818},"\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":1820,"title":1821},"\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":1823,"title":1824},"\u002Fcss-only-micro-interactions-animations\u002Fclip-path-and-mask-animations","Clip-Path & Mask Animations: Animating Visibility Instead of Position",{"path":1781,"title":5},{"path":1827,"title":1828},"\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":1830,"title":1831},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fanimating-gradients","Animating CSS Gradients: Smooth Colour Motion Without Jumps",{"path":1833,"title":1834},"\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":1836,"title":1837},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions","Color & Theme Transitions: Colour as Part of the Motion System",{"path":1839,"title":1840},"\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":1842,"title":1843},"\u002Fcss-only-micro-interactions-animations\u002Fcolor-and-theme-transitions\u002Fsmooth-theme-switching-transitions","Smooth Theme Switching: Crossfades, Circular Reveals and No Flash",{"path":1845,"title":1846},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fcontainer-query-hover-affordances","Container Query Hover Affordances: When Narrow Means Persistent, Not Hidden",{"path":1848,"title":1849},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion","Container-Aware Motion: Animation Sized by the Space a Component Actually Has",{"path":1851,"title":1852},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Flayout-change-animations-at-container-breakpoints","Animating Changes at Container Breakpoints",{"path":1854,"title":1855},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fmotion-driven-by-container-style-queries","Motion Driven by Container Style Queries",{"path":1857,"title":1858},"\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":1860,"title":1861},"\u002Fcss-only-micro-interactions-animations\u002Fcontainer-aware-motion\u002Fsuppressing-motion-in-small-containers","Suppressing Motion in Small Containers: Deliberately Animating Nothing",{"path":1863,"title":1864},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fcontrolling-css-animations-from-javascript","Controlling CSS Animations From JavaScript",{"path":1866,"title":1867},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api","CSS Animation vs the Web Animations API: A Decision Guide",{"path":1869,"title":1870},"\u002Fcss-only-micro-interactions-animations\u002Fcss-animation-vs-web-animations-api\u002Fwaapi-vs-css-for-interruptible-ui","Interruptible UI: CSS Transitions vs WAAPI",{"path":1872,"title":1873},"\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":1875,"title":1876},"\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":1878,"title":1879},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fcustom-property-fallbacks-and-invalid-values","Custom Property Fallbacks and Invalid Values",{"path":1881,"title":1882},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Ffluid-spacing-tokens-driving-transition-durations","Fluid Spacing Tokens That Drive Transition Durations",{"path":1884,"title":1885},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture","CSS Custom Properties Architecture: Scalable Design Systems & Dynamic UI",{"path":1887,"title":1888},"\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":1890,"title":1891},"\u002Fcss-only-micro-interactions-animations\u002Fcss-custom-properties-architecture\u002Fscoping-custom-properties-to-components","Scoping Custom Properties to Components",{"path":1893,"title":1894},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fcss-transition-timing-functions","CSS Transition Timing Functions: ease, cubic-bezier(), steps() and linear()",{"path":1896,"title":1897},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals","CSS Transition Fundamentals: Architecture, Performance & Patterns",{"path":1899,"title":1900},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Finterrupted-and-reversing-transitions","Interrupted and Reversing Transitions: What Happens Mid-Flight",{"path":1902,"title":1903},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Fstarting-style-entry-animations","@starting-style: Animating an Element's Very First Style Change",{"path":1905,"title":1906},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-delay-choreography","Choreographing Motion With transition-delay",{"path":1908,"title":1909},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransition-shorthand-and-multiple-properties","The transition Shorthand and Multiple Properties",{"path":1911,"title":1912},"\u002Fcss-only-micro-interactions-animations\u002Fcss-transition-fundamentals\u002Ftransitioning-display-with-allow-discrete","Transitioning display with transition-behavior: allow-discrete and @starting-style",{"path":1914,"title":1915},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fanimating-dialog-open-and-close","Animating \u003Cdialog> Open and Close: Both Directions, No Library",{"path":1917,"title":1918},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fbackdrop-animations","Animating ::backdrop: Fades and Blurs Behind Dialogs and Popovers",{"path":1920,"title":1921},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations","Dialog & Popover Animations: Motion for the Top Layer",{"path":1923,"title":1924},"\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":1926,"title":1927},"\u002Fcss-only-micro-interactions-animations\u002Fdialog-and-popover-animations\u002Fpopover-entry-and-exit-transitions","Popover Menus That Animate From Their Anchor",{"path":1929,"title":1930},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fchoosing-animation-durations","Choosing Animation Durations: How Long Motion Should Last",{"path":1932,"title":1933},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fcubic-bezier-overshoot-and-anticipation","Overshoot and Anticipation With cubic-bezier(): Motion With Character",{"path":1935,"title":1936},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design\u002Fentry-vs-exit-easing","Entry vs Exit Easing: Different Curves for Arriving and Leaving",{"path":1938,"title":1939},"\u002Fcss-only-micro-interactions-animations\u002Feasing-and-motion-design","Easing & Motion Design: Making CSS Motion Feel Intentional",{"path":1941,"title":1942},"\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":1944,"title":1945},"\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":1947,"title":1948},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Faccessible-css-only-tooltips","Accessible CSS-Only Tooltips and Hover Cards With  and ",{"path":1950,"title":1951},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Fbutton-press-and-active-states","Button Press and  States",{"path":1953,"title":1954},"\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":1956,"title":1957},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design\u002Ffocus-within-form-patterns"," Form Patterns: Styling a Group From the Field Inside It",{"path":1959,"title":1960},"\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":1962,"title":1963},"\u002Fcss-only-micro-interactions-animations\u002Fhover-focus-state-design","Hover & Focus State Design: Spec-Compliant Patterns for Modern UIs",{"path":1965,"title":1966},"\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":1968,"title":1969},"\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":1971,"title":1972},"\u002Fcss-only-micro-interactions-animations","CSS-Only Micro-Interactions & Animations: Architecture, Performance & Implementation",{"path":1974,"title":1975},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fanimation-composition-and-stacking","Stacking Animations With animation-composition",{"path":1977,"title":1978},"\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":1980,"title":1981},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcontainer-query-triggered-keyframe-animations","Container-Query-Triggered Keyframe Animations: Animate Differently per Available Space",{"path":1983,"title":1984},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fcss-only-accordions-and-disclosure","CSS-Only Accordions and Disclosure Widgets with details and summary",{"path":1986,"title":1987},"\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":1989,"title":1990},"\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":1992,"title":1993},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns","Keyframe Animation Patterns: Spec-Compliant Architectures for Modern UIs",{"path":1995,"title":1996},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fmulti-step-keyframes-and-per-keyframe-easing","Multi-Step Keyframes and Per-Keyframe Easing",{"path":1998,"title":1999},"\u002Fcss-only-micro-interactions-animations\u002Fkeyframe-animation-patterns\u002Fstaggered-list-animations-with-custom-properties","Staggered List Animations Using --i Index Custom Properties",{"path":2001,"title":2002},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fanimating-box-shadow-and-filters-cheaply","Animating box-shadow and Filters Cheaply",{"path":2004,"title":2005},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcontain-property-for-animation-performance","The contain Property for Animation Performance",{"path":2007,"title":2008},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Fcss-triggers-layout-paint-composite","Layout, Paint and Composite: What Triggers What",{"path":2010,"title":2011},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration","Performance & GPU Acceleration in CSS: A Developer’s Blueprint",{"path":2013,"title":2014},"\u002Fcss-only-micro-interactions-animations\u002Fperformance-gpu-acceleration\u002Foptimizing-css-animations-for-60fps","Optimizing CSS Animations for 60fps: Budgeting the Frame",{"path":2016,"title":2017},"\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":2019,"title":2020},"\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":2022,"title":2023},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations","Scroll-Driven Animations: Binding Motion to Scroll Position in Pure CSS",{"path":2025,"title":2026},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-animation-fallbacks","Shipping Scroll-Driven Animations Without Breaking Anything",{"path":2028,"title":2029},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-driven-parallax-effects","Scroll-Driven Parallax Effects in CSS",{"path":2031,"title":2032},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-progress-bar-without-javascript","A Reading Progress Bar Driven by scroll(root)",{"path":2034,"title":2035},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fscroll-triggered-reveal-animations","Reveal-on-Scroll with view() and animation-range",{"path":2037,"title":2038},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Ftimeline-scope-for-cross-element-animations","timeline-scope for Cross-Element Animations",{"path":2040,"title":2041},"\u002Fcss-only-micro-interactions-animations\u002Fscroll-driven-animations\u002Fview-timeline-and-animation-range","View Timelines and animation-range",{"path":2043,"title":2044},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fcross-document-view-transitions","Cross-Document View Transitions",{"path":2046,"title":2047},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers","View Transitions for CSS Developers: the Pseudo-Element Tree, Snapshots, and Named Elements",{"path":2049,"title":2050},"\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":2052,"title":2053},"\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":2055,"title":2056},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transition-types-and-classes","View Transition Types and Classes",{"path":2058,"title":2059},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-for-list-reordering","View Transitions for List Reordering",{"path":2061,"title":2062},"\u002Fcss-only-micro-interactions-animations\u002Fview-transitions-for-css-developers\u002Fview-transitions-with-reduced-motion","Honouring prefers-reduced-motion in View Transitions",{"path":317,"title":2064},"Modern CSS Layouts & Micro-Interactions",{"path":2066,"title":2067},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioned-tooltips","Anchor-Positioned Tooltips: Tethering, Flipping, and Getting the Semantics Right",{"path":2069,"title":2070},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-positioning-fallbacks","Anchor Positioning Fallbacks: A Graceful Floor for Older Browser Versions",{"path":2072,"title":2073},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fanchor-size-for-matching-widths","anchor-size(): Overlays That Match Their Trigger's Size",{"path":2075,"title":2076},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays","CSS Anchor Positioning and Overlays: Tethering Elements Without JavaScript",{"path":2078,"title":2079},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-attribute-and-css-styling","The popover Attribute: Top-Layer Overlays With No JavaScript",{"path":2081,"title":2082},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fpopover-light-dismiss-and-stacking","Popover Light Dismiss, Nesting and Stacking",{"path":2084,"title":2085},"\u002Fmastering-container-queries-responsive-layouts\u002Fanchor-positioning-and-overlays\u002Fposition-area-grid-explained","position-area: The Anchor Placement Grid",{"path":2087,"title":2088},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fcontainer-query-polyfill-tradeoffs","Container Query Polyfills: What They Cost and When to Skip Them",{"path":2090,"title":2091},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ffeature-detection-with-supports","Feature Detection with @supports: Syntax, Semantics, and the Traps",{"path":2093,"title":2094},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fhandling-container-query-fallbacks-for-older-browsers","Handling Container Query Fallbacks for Older Browsers",{"path":2096,"title":2097},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks","Container Query Fallbacks: Spec-Compliant CSS Strategies for Legacy Browsers",{"path":2099,"title":2100},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Fintrinsic-layout-fallbacks-without-queries","Intrinsic Layout Fallbacks: Baselines That Adapt Without Any Query",{"path":2102,"title":2103},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-fallbacks\u002Ftesting-fallbacks-without-old-browsers","Testing CSS Fallbacks Without an Old Browser",{"path":2105,"title":2106},"\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":2108,"title":2109},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-query-range-and-logic-operators","Container Query Range Syntax and Logic Operators",{"path":2111,"title":2112},"\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":2114,"title":2115},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-type-size-vs-inline-size","Choosing container-type: inline-size, size, or normal",{"path":2117,"title":2118},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fcontainer-vs-media-queries-comparison","Container vs Media Queries: Choosing the Right Reference Box",{"path":2120,"title":2121},"\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":2123,"title":2124},"\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":2126,"title":2127},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics","Container Query Syntax Basics",{"path":2129,"title":2130},"\u002Fmastering-container-queries-responsive-layouts\u002Fcontainer-query-syntax-basics\u002Fnesting-and-naming-container-queries","Nesting and Naming Container Queries: Targeting the Right Ancestor",{"path":2132,"title":2133},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fauto-fit-minmax-responsive-grids","Responsive Grids with repeat(auto-fit, minmax())",{"path":2135,"title":2136},"\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":2138,"title":2139},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fgrid-auto-flow-dense-packing","grid-auto-flow: dense for Packed Layouts",{"path":2141,"title":2142},"\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":2144,"title":2145},"\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":2147,"title":2148},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts","CSS Grid and Subgrid Layouts for Responsive Interfaces",{"path":2150,"title":2151},"\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":2153,"title":2154},"\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":2156,"title":2157},"\u002Fmastering-container-queries-responsive-layouts\u002Fcss-grid-and-subgrid-layouts\u002Fsubgrid-vs-nested-grid","Subgrid vs an Independently Nested Grid",{"path":2159,"title":2160},"\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":2162,"title":2163},"\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":2165,"title":2166},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-grow-and-flex-shrink-explained","flex-grow and flex-shrink Explained",{"path":2168,"title":2169},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflex-wrap-intrinsic-responsive-rows","Breakpoint-Free Responsive Rows With flex-wrap and flex-basis",{"path":2171,"title":2172},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns\u002Fflexbox-gap-and-spacing","Flexbox gap vs Margins: Spacing Items Without Edge Hacks",{"path":2174,"title":2175},"\u002Fmastering-container-queries-responsive-layouts\u002Fflexbox-layout-patterns","Flexbox Layout Patterns: One-Dimensional Layout for Real Components",{"path":2177,"title":2178},"\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":2180,"title":2181},"\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":2183,"title":2184},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Fdebugging-clamp-values","Debugging clamp(): Values That Are Ignored, Stuck or Never Fluid",{"path":2186,"title":2187},"\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":2189,"title":2190},"\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":2192,"title":2193},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-type-accessibility-and-zoom","Fluid Type, Accessibility and Zoom: The vw-Only Trap",{"path":2195,"title":2196},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp\u002Ffluid-typography-without-javascript","Fluid Typography Without JavaScript: A Precision CSS Reference",{"path":2198,"title":2199},"\u002Fmastering-container-queries-responsive-layouts\u002Ffluid-typography-with-clamp","Fluid Typography with clamp(): A Practical Guide for Modern CSS",{"path":2201,"title":2202},"\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":2204,"title":2205},"\u002Fmastering-container-queries-responsive-layouts","Mastering Container Queries & Responsive Layouts",{"path":2207,"title":2208},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Faspect-ratio-for-responsive-media","Using aspect-ratio for Responsive Media and Preventing Layout Shift",{"path":2210,"title":2211},"\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":2213,"title":2214},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques","Intrinsic Sizing Techniques: Modern CSS Layouts for Responsive UI",{"path":2216,"title":2217},"\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":2219,"title":2220},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fmin-max-fit-content-explained","min-content, max-content, and fit-content() Explained",{"path":2222,"title":2223},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fobject-fit-and-object-position","object-fit and object-position: Images That Fit Any Box",{"path":2225,"title":2226},"\u002Fmastering-container-queries-responsive-layouts\u002Fintrinsic-sizing-techniques\u002Fpreventing-flex-and-grid-overflow","The min-width: auto Trap in Flex and Grid Layouts",{"path":2228,"title":2229},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-for-reset-and-tokens","Cascade Layers for Reset and Design Tokens",{"path":2231,"title":2232},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcascade-layers-vs-specificity-hacks","Cascade Layers vs Specificity Hacks: Ordering Instead of Escalating",{"path":2234,"title":2235},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fcss-scope-for-component-styles","@scope for Component Styles: Short Selectors That Cannot Leak",{"path":2237,"title":2238},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies","Modern CSS Reset Strategies: A Spec-Compliant Foundation",{"path":2240,"title":2241},"\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":2243,"title":2244},"\u002Fmastering-container-queries-responsive-layouts\u002Fmodern-css-reset-strategies\u002Fwriting-a-minimal-modern-reset","Writing a Minimal Modern CSS Reset: Every Line Justified",{"path":2246,"title":2247},"\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":2249,"title":2250},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has\u002Fempty-and-loading-states-with-has","Empty and Loading States With ()",{"path":2252,"title":2253},"\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":2255,"title":2256},"\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":2258,"title":2259},"\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":2261,"title":2262},"\u002Fmastering-container-queries-responsive-layouts\u002Fparent-aware-layouts-with-has","Parent-Aware Layouts With :has(): Letting Containers React to Their Contents",{"path":2264,"title":2265},"\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":2267,"title":2268},"\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":2270,"title":2271},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-data-tables","Container Query Data Tables: Reflowing Tables to Cards",{"path":2273,"title":2274},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fcontainer-query-sidebar-layouts","Container Query Sidebar Layouts That Travel Between Contexts",{"path":2276,"title":2277},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns","Responsive Component Patterns: Architecture & Implementation",{"path":2279,"title":2280},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-forms-with-container-queries","Responsive Forms with Container Queries: Reflow Without Losing the Wiring",{"path":2282,"title":2283},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-hero-sections-with-container-queries","Responsive Hero Sections With Container Queries",{"path":2285,"title":2286},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-navigation-without-media-queries","Responsive Navigation Without Media Queries Using Container Queries",{"path":2288,"title":2289},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Fresponsive-pricing-tables","Responsive Pricing Tables: Aligned Features, a Clear Recommendation, Any Width",{"path":2291,"title":2292},"\u002Fmastering-container-queries-responsive-layouts\u002Fresponsive-component-patterns\u002Ftabs-that-become-accordions","Tabs That Become an Accordion: One Component, Two Layouts",{"path":2294,"title":2295},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts\u002Fcss-only-carousel-with-scroll-snap","A CSS-Only Carousel With Scroll Snap",{"path":2297,"title":2298},"\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":2300,"title":2301},"\u002Fmastering-container-queries-responsive-layouts\u002Fscroll-snap-and-overflow-layouts","Scroll Snap & Overflow Layouts: Designing Components That Scroll on Purpose",{"path":2303,"title":2304},"\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":2306,"title":2307},"\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":2309,"title":2310},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fcombining-size-and-style-queries","Combining Size and Style Container Queries",{"path":2312,"title":2313},"\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":2315,"title":2316},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state","Style Queries and Container State: Token-Driven Component Variants",{"path":2318,"title":2319},"\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":2321,"title":2322},"\u002Fmastering-container-queries-responsive-layouts\u002Fstyle-queries-and-container-state\u002Fstyle-query-component-variants","Component Variants With Style Queries: One Token, Many Looks",{"path":2324,"title":2325},"\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":2327,"title":2328},"\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":2330,"title":2331},"\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":2333,"title":2334},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout","Viewport Units & Mobile Layout: Designing for the Screen You Actually Get",{"path":2336,"title":2337},"\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":2339,"title":2340},"\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":2342,"title":2343},"\u002Fmastering-container-queries-responsive-layouts\u002Fviewport-units-and-mobile-layout\u002Fvirtual-keyboard-and-interactive-widget","Layouts That Survive the Virtual Keyboard",{"title":2345,"caption":2346,"height":2347,"html":2348,"css":2349},"Three mask fades on a dark surface","The hero fades at the bottom and both sides, the shelf fades at its trailing edge as you scroll it, and the excerpt fades until opened.",470,"\n\u003Cdiv class=\"stage\">\n  \u003Cdiv class=\"hero\" role=\"img\" aria-label=\"Sunset gradient\">\u003C\u002Fdiv>\n  \u003Cdiv class=\"shelf\" tabindex=\"0\" aria-label=\"Collections\">\u003Cdiv>\u003C\u002Fdiv>\u003Cdiv>\u003C\u002Fdiv>\u003Cdiv>\u003C\u002Fdiv>\u003Cdiv>\u003C\u002Fdiv>\u003Cdiv>\u003C\u002Fdiv>\u003C\u002Fdiv>\n  \u003Cdetails class=\"excerpt\">\n    \u003Csummary>Read the full description\u003C\u002Fsummary>\n    \u003Cp>The old coastal road was built in stages over three decades, following the line of an older cart track that hugged the cliffs. Each stage added bridges, cuttings and lay-bys, and the result is a route that feels improvised in places and grand in others. Today it is quieter, used by cyclists and walkers as much as by cars, and the views across the bay are the reason most people come.\u003C\u002Fp>\n  \u003C\u002Fdetails>\n\u003C\u002Fdiv>","\nbody { display: block; background: #0f172a; color: #e2e8f0; }\n.stage { display: grid; gap: 1rem; }\n.shelf {\n  display: flex;\n  gap: 0.75rem;\n  overflow-x: auto;\n  padding-bottom: 0.5rem;\n  mask-image: linear-gradient(to right, #000 calc(100% - 4rem), transparent);\n}\n.shelf > * { flex: 0 0 9rem; height: 6rem; border-radius: 8px; background: #6366f1; }\n.shelf:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }\n.excerpt p {\n  max-height: 7.5rem;\n  max-height: 5lh;\n  overflow: hidden;\n  margin: 0.5rem 0 0;\n  mask-image: linear-gradient(to bottom, #000 60%, transparent);\n}\n.excerpt[open] p { max-height: none; mask-image: none; }\n.excerpt summary { cursor: pointer; color: #93c5fd; }\n.hero {\n  height: 8rem;\n  background: linear-gradient(135deg, #f59e0b, #db2777 55%, #4c1d95);\n  mask-image:\n    linear-gradient(to bottom, #000 55%, transparent),\n    linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);\n  mask-composite: intersect;\n}",1789717747084]