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