/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/html/minimize-transforms/page.html
102 строки
6 KB
Alexander Akait
feat(css): safe CSS minify transforms, measured against the engine (#21588)
03 авг 2026, 14:58
Не верифицирован
03 авг 2026, 14:58
f2462c2
Код
Авторство
О чём код?
<!DOCTYPE HTML> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"> <meta name="description" content="a, b kept as written"> <title>Transform corpus</title> <style type="text/css"> :root { --gap : 8px ; } body { margin : 0 0 0 0 ; color : #ff0000 ; } .card { border-radius : 4px 4px 4px 4px ; background : rgb(255, 255, 255) ; } </style> <style type="text/template">a { not css </style> </head> <body> <!-- inert comment, dropped --> <!--[if IE]><p>conditional comment, kept</p><![endif]--> <DIV CLASS="a b" ID="upper">source casing folds</DIV> <div class=" trimmed " style="color: #ff0000; padding: 0 0 0 0">token list and declarations</div> <div style="content: '}'">declines: escapes the wrapper</div> <div style="--custom: {a:b}">declines: custom property braces</div> <p>optional end tags</p> <ul><li>one</li><li>two</li></ul> <dl><dt>a</dt><dd>b</dd><dt>c</dt></dl> <table><tbody><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></tbody></table> <table><thead><tr><th>h</th></tr></thead><tbody><tr><td>a</td></tr></tbody></table> <a><p>trailing p kept: parent absorbs</p></a> <my-el><p>trailing p kept: custom element</p></my-el> <form method="get" novalidate="novalidate"> <input type="checkbox" checked="checked" disabled="disabled"> <input type="text" disabled="true"> <select multiple="multiple"><option selected="selected">a</option><option>b</option></select> <textarea readonly="readonly"> keep me </textarea> </form> <div checked="checked">not boolean here</div> <img srcset="a.png 1x, b.png 2x" src="a.png" alt="unquoted where legal"> <img srcset=" bare.png , next.png 2x " alt="descriptor-less keeps its space"> <img srcset="a.png 100w 2x" alt="invalid srcset kept"> <img srcset="data:image/gif;base64,R0lGOD 1x, b.png 2x" alt="comma in url"> <a rel="noopener noreferrer" ping=" /a /b " href="x">token lists collapse</a> <iframe sandbox=" allow-scripts allow-forms "></iframe> <label for="a b">for keeps its spaces: an id may contain one</label> <output for="a b">for is a token list here</output> <link rel=" stylesheet " sizes=" 16x16 32x32 " href="s.css"> <link rel="preload" as="script" blocking=" render render " href="p.js"> <div part=" a b " itemscope="itemscope" itemtype=" https://schema.org/Thing ">globals</div> <div headingreset="headingreset" headingoffset=" 02 " tabindex=" -01 ">heading globals</div> <table><tr><th id="h">h</th><td headers=" h h2 " rowspan=" 02 ">headers is a token list</td></tr></table> <ol><li value=" +5 ">li value is signed</li></ol> <img src="a.png" hspace=" 04 " vspace=" 0 " longdesc=" d.html " lowsrc=" l.png " alt="legacy img attributes"> <object codebase=" c/ " data=" o.bin " width=" 08 " hspace=" 02 "></object> <a href=" trimmed.html ">url ends trimmed</a> <img src=" a.png " width=" 10 " height=" 020 " alt=" alt keeps its spaces "> <table><tr><td width=" 50% " colspan=" 007 ">legacy percentage kept, integer normalized</td></tr></table> <textarea rows=" 3 " cols=" 04 ">x</textarea> <input type="file" accept=" .png , .jpg "> <map><area coords=" 1 , 2 , 3 " shape="rect"></map> <img sizes="(max-width: 100px) 100px , 200px" srcset="s.png 1x" alt="sizes keeps its media condition"> <a href="x?a=1" title="quoted: has =">kept quoted</a> <a href="plain.html">unquoted</a> <br/> <input type="text" /> <svg viewBox="0 0 8 8"><rect x="1" y="2" class="a b"/><circle R="1"/><myCustomThing/></svg> <script type="application/json">{ "a" : 1 , "b" : [ 1 , 2 ] , "s" : "keep spaces" }</script> <script type="application/ld+json">{ "@context" : "https://schema.org" , "big" : 12345678901234567890 , "n" : 1.0 }</script> <script type="importmap">{ "imports" : { "a" : "./a.js" } }</script> <script type="speculationrules">{ "prerender" : [ { "urls" : [ "/x" ] } ] }</script> <script type="application/json">not json { kept</script> <script type="text/template">{ "a" : 1 } kept</script> <pre> preformatted text </pre> <!-- ASCII-only grammars: a Unicode trim would change what these parse to --> <div class=" a b">nbsp is a class token of its own</div> <a href=" nbsp.html">nbsp stays in the url</a> <table><tr><td colspan=" 2">nbsp is not integer whitespace</td><td colspan="+2">plus does not parse as non-negative</td></tr></table> <ol start="+5"><li>signed integer normalizes</li></ol> <ol start=" -05 "><li>negative normalizes</li></ol> <meta name="viewport" content=" width=device-width, initial-scale=1"> <input type="file" accept=" .png , .jpg"> <img srcset="a.png 1x" alt="nbsp descriptor kept"> <script type=" application/json">{ "a" : 1 }</script> <style type=" text/css">a { color : red ; }</style> <AİX ID="x">only ascii folds in a name</AİX> <table><caption>caption end tag goes</caption><colgroup><col><col></colgroup><tbody><tr><td>a</td></tr></tbody></table> <table><caption>whitespace behind it keeps the tag</caption> <colgroup><col></colgroup><tr><td>a</td></tr></table> <table><colgroup><col></colgroup><colgroup><col></colgroup><tr><td>a</td></tr></table> <table><colgroup span="2"><col></colgroup><colgroup></colgroup><tr><td>a</td></tr></table> <p>a > b, < and & still escape</p> <input type="file" accept=" image/ png , .jpg "> <map><area shape="poly" coords=" 1 2 , 3 , 4 5 "></map> <input type="checkbox" alpha="alpha"> <template shadowrootclonable="shadowrootclonable" shadowrootserializable="shadowrootserializable"><span>a</span></template> <img controls="controls" src="a.png" alt="controls is boolean on img now"> <table><tr><td nowrap="nowrap">obsolete but still boolean</td></tr></table> <hr noshade="noshade"> <div alpha="x">not boolean here</div> <p>R&D, AT&T and a query x?a=1&b=2 keep a bare ampersand</p> <p>but &amp;, &lt; and &#38; stay escaped: they would read back as a reference</p> <p>café and decode to the character itself</p> </body> </html>