/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/css/minimize-lightningcss-values/style.css
261 строка
14 KB
Alexander Akait
feat(minify): more safe CSS/HTML transforms, with the name tables generated (#21581)
02 авг 2026, 13:05
Не верифицирован
02 авг 2026, 13:05
23420d3
Код
Авторство
О чём код?
/* Ported from lightningcss's `minify_test` cases (src/lib.rs), grouped by the test function they come from. Two lightningcss transforms are passthroughs here on purpose. It packs an alpha color into hex (`rgba(0, 0, 0, .5)` becomes `#00000080`), which is lossy — 0x80/255 is .50196, not .5 — and it normalizes custom-property values, which `getComputedStyle().getPropertyValue()` can observe. */ /*! test_color: .foo { color: yellow } */ .foo { color: yellow } /*! test_color: .foo { color: rgb(255, 255, 0) } */ .foo { color: rgb(255, 255, 0) } /*! test_color: .foo { color: rgba(255, 255, 0, 1) } */ .foo { color: rgba(255, 255, 0, 1) } /*! test_color: .foo { color: rgba(255, 255, 0, 0.8) } */ .foo { color: rgba(255, 255, 0, 0.8) } /*! test_color: .foo { color: rgb(128, 128, 128) } */ .foo { color: rgb(128, 128, 128) } /*! test_color: .foo { color: rgb(123, 255, 255) } */ .foo { color: rgb(123, 255, 255) } /*! test_color: .foo { color: rgba(123, 255, 255, 0.5) } */ .foo { color: rgba(123, 255, 255, 0.5) } /*! test_color: .foo { color: rgb(123 255 255) } */ .foo { color: rgb(123 255 255) } /*! test_color: .foo { color: rgb(123 255 255 / .5) } */ .foo { color: rgb(123 255 255 / .5) } /*! test_color: .foo { color: rgb(123 255 255 / 50%) } */ .foo { color: rgb(123 255 255 / 50%) } /*! test_color: .foo { color: rgb(48% 100% 100% / 50%) } */ .foo { color: rgb(48% 100% 100% / 50%) } /*! test_color: .foo { color: hsl(100deg, 100%, 50%) } */ .foo { color: hsl(100deg, 100%, 50%) } /*! test_color: .foo { color: hsl(100, 100%, 50%) } */ .foo { color: hsl(100, 100%, 50%) } /*! test_color: .foo { color: hsl(100 100% 50%) } */ .foo { color: hsl(100 100% 50%) } /*! test_color: .foo { color: hsl(100 100 50) } */ .foo { color: hsl(100 100 50) } /*! test_color: .foo { color: hsl(100, 100%, 50%, .8) } */ .foo { color: hsl(100, 100%, 50%, .8) } /*! test_color: .foo { color: hsl(100 100% 50% / .8) } */ .foo { color: hsl(100 100% 50% / .8) } /*! test_color: .foo { color: hsla(100, 100%, 50%, .8) } */ .foo { color: hsla(100, 100%, 50%, .8) } /*! test_color: .foo { color: hsla(100 100% 50% / .8) } */ .foo { color: hsla(100 100% 50% / .8) } /*! test_color: .foo { color: transparent } */ .foo { color: transparent } /*! test_color: .foo { color: currentColor } */ .foo { color: currentColor } /*! test_color: .foo { color: ButtonBorder } */ .foo { color: ButtonBorder } /*! test_color: .foo { color: hwb(194 0% 0%) } */ .foo { color: hwb(194 0% 0%) } /*! test_color: .foo { color: hwb(194 0% 0% / 50%) } */ .foo { color: hwb(194 0% 0% / 50%) } /*! test_color: .foo { color: hwb(194 0% 50%) } */ .foo { color: hwb(194 0% 50%) } /*! test_color: .foo { color: hwb(194 50% 0%) } */ .foo { color: hwb(194 50% 0%) } /*! test_color: .foo { color: hwb(194 50 0) } */ .foo { color: hwb(194 50 0) } /*! test_color: .foo { color: hwb(194 50% 50%) } */ .foo { color: hwb(194 50% 50%) } /*! test_color: .foo { color: light-dark(#FFF, #FFF) } */ .foo { color: light-dark(#FFF, #FFF) } /*! test_color: .foo { color: ActiveText } */ .foo { color: ActiveText } /*! test_color: .foo { color: lab(29.2345% 39.3825 20.0664); } */ .foo { color: lab(29.2345% 39.3825 20.0664); } /*! test_color: .foo { color: lab(29.2345 39.3825 20.0664); } */ .foo { color: lab(29.2345 39.3825 20.0664); } /*! test_color: .foo { color: lab(29.2345% 39.3825% 20.0664%); } */ .foo { color: lab(29.2345% 39.3825% 20.0664%); } /*! test_color: .foo { color: lab(29.2345% 39.3825 20.0664 / 100%); } */ .foo { color: lab(29.2345% 39.3825 20.0664 / 100%); } /*! test_color: .foo { color: lab(29.2345% 39.3825 20.0664 / 50%); } */ .foo { color: lab(29.2345% 39.3825 20.0664 / 50%); } /*! test_color: .foo { color: lch(29.2345% 44.2 27); } */ .foo { color: lch(29.2345% 44.2 27); } /*! test_color: .foo { color: lch(29.2345 44.2 27); } */ .foo { color: lch(29.2345 44.2 27); } /*! test_color: .foo { color: lch(29.2345% 44.2% 27deg); } */ .foo { color: lch(29.2345% 44.2% 27deg); } /*! test_color: .foo { color: lch(29.2345% 44.2 45deg); } */ .foo { color: lch(29.2345% 44.2 45deg); } /*! test_color: .foo { color: lch(29.2345% 44.2 .5turn); } */ .foo { color: lch(29.2345% 44.2 .5turn); } /*! test_color: .foo { color: lch(29.2345% 44.2 27 / 100%); } */ .foo { color: lch(29.2345% 44.2 27 / 100%); } /*! test_color: .foo { color: lch(29.2345% 44.2 27 / 50%); } */ .foo { color: lch(29.2345% 44.2 27 / 50%); } /*! test_color: .foo { color: oklab(40.101% 0.1147 0.0453); } */ .foo { color: oklab(40.101% 0.1147 0.0453); } /*! test_color: .foo { color: oklab(.40101 0.1147 0.0453); } */ .foo { color: oklab(.40101 0.1147 0.0453); } /*! test_color: .foo { color: oklab(40.101% 0.1147% 0.0453%); } */ .foo { color: oklab(40.101% 0.1147% 0.0453%); } /*! test_color: .foo { color: oklch(40.101% 0.12332 21.555); } */ .foo { color: oklch(40.101% 0.12332 21.555); } /*! test_color: .foo { color: oklch(.40101 0.12332 21.555); } */ .foo { color: oklch(.40101 0.12332 21.555); } /*! test_color: .foo { color: oklch(40.101% 0.12332% 21.555); } */ .foo { color: oklch(40.101% 0.12332% 21.555); } /*! test_color: .foo { color: oklch(40.101% 0.12332 .5turn); } */ .foo { color: oklch(40.101% 0.12332 .5turn); } /*! test_color: .foo { color: color(display-p3 1 0.5 0); } */ .foo { color: color(display-p3 1 0.5 0); } /*! test_color: .foo { color: color(display-p3 100% 50% 0%); } */ .foo { color: color(display-p3 100% 50% 0%); } /*! test_color: .foo { color: color(xyz-d50 0.2005 0.14089 0.4472); } */ .foo { color: color(xyz-d50 0.2005 0.14089 0.4472); } /*! test_color: .foo { color: color(xyz-d50 20.05% 14.089% 44.72%); } */ .foo { color: color(xyz-d50 20.05% 14.089% 44.72%); } /*! test_color: .foo { color: color(xyz-d65 0.2005 0.14089 0.4472); } */ .foo { color: color(xyz-d65 0.2005 0.14089 0.4472); } /*! test_color: .foo { color: color(xyz-d65 20.05% 14.089% 44.72%); } */ .foo { color: color(xyz-d65 20.05% 14.089% 44.72%); } /*! test_color: .foo { color: color(xyz 0.2005 0.14089 0.4472); } */ .foo { color: color(xyz 0.2005 0.14089 0.4472); } /*! test_color: .foo { color: color(xyz 20.05% 14.089% 44.72%); } */ .foo { color: color(xyz 20.05% 14.089% 44.72%); } /*! test_color: .foo { color: color(xyz 0.2005 0 0); } */ .foo { color: color(xyz 0.2005 0 0); } /*! test_color: .foo { color: color(xyz 0 0 0); } */ .foo { color: color(xyz 0 0 0); } /*! test_color: .foo { color: color(xyz 0 1 0); } */ .foo { color: color(xyz 0 1 0); } /*! test_color: .foo { color: color(xyz 0 1 0 / 20%); } */ .foo { color: color(xyz 0 1 0 / 20%); } /*! test_color: .foo { color: color(xyz 0 0 0 / 20%); } */ .foo { color: color(xyz 0 0 0 / 20%); } /*! test_color: .foo { color: color(display-p3 100% 50% 0 / 20%); } */ .foo { color: color(display-p3 100% 50% 0 / 20%); } /*! test_color: .foo { color: color(display-p3 100% 0 0 / 20%); } */ .foo { color: color(display-p3 100% 0 0 / 20%); } /*! test_color: .foo { color: hsl(none none none) } */ .foo { color: hsl(none none none) } /*! test_color: .foo { color: hwb(none none none) } */ .foo { color: hwb(none none none) } /*! test_color: .foo { color: rgb(none none none) } */ .foo { color: rgb(none none none) } /*! test_custom_properties: .foo { --test: ; } */ .foo { --test: ; } /*! test_custom_properties: .foo { --test: ; } */ .foo { --test: ; } /*! test_custom_properties: .foo { --test: foo; } */ .foo { --test: foo; } /*! test_custom_properties: .foo { --test: foo; } */ .foo { --test: foo; } /*! test_custom_properties: .foo { --test: foo ; } */ .foo { --test: foo ; } /*! test_custom_properties: .foo { --test: foo ; } */ .foo { --test: foo ; } /*! test_custom_properties: .foo { --test:foo; } */ .foo { --test:foo; } /*! test_custom_properties: .foo { --test:foo ; } */ .foo { --test:foo ; } /*! test_custom_properties: .foo { --test: var(--foo, 20px); } */ .foo { --test: var(--foo, 20px); } /*! test_custom_properties: .foo { transition: var(--foo, 20px), var(--bar, 40px); } */ .foo { transition: var(--foo, 20px), var(--bar, 40px); } /*! test_custom_properties: .foo { background: var(--color) var(--image); } */ .foo { background: var(--color) var(--image); } /*! test_custom_properties: .foo { color: var(--color, rgb(255, 255, 0)); } */ .foo { color: var(--color, rgb(255, 255, 0)); } /*! test_custom_properties: .foo { color: var(--color, #ffff00); } */ .foo { color: var(--color, #ffff00); } /*! test_custom_properties: .foo { color: var(--color, rgb(var(--red), var(--green), 0)); } */ .foo { color: var(--color, rgb(var(--red), var(--green), 0)); } /*! test_custom_properties: .foo { --test: .5s; } */ .foo { --test: .5s; } /*! test_custom_properties: .foo { --theme-sizes-1\/12: 2 } */ .foo { --theme-sizes-1\/12: 2 } /*! test_custom_properties: .foo { --test: 0px; } */ .foo { --test: 0px; } /*! test_custom_properties: .foo { background-color: attr(data-color type(<color>)); } */ .foo { background-color: attr(data-color type(<color>)); } /*! test_custom_properties: .foo { width: attr(data-width type(<length>), 100px); } */ .foo { width: attr(data-width type(<length>), 100px); } /*! test_custom_properties: .foo { width: attr( data-foo % ); } */ .foo { width: attr( data-foo % ); } /*! test_custom_properties: .foo { width: attr( data-foo %, ); } */ .foo { width: attr( data-foo %, ); } /*! test_custom_properties: .foo { width: attr( data-foo px ); } */ .foo { width: attr( data-foo px ); } /*! test_custom_properties: .foo { width: attr(data-foo number ); } */ .foo { width: attr(data-foo number ); } /*! test_custom_properties: .foo { width: attr(data-foo raw-string); } */ .foo { width: attr(data-foo raw-string); } /*! test_font_face: @font-face {src: url(test.woff);} */ @font-face {src: url(http://example.test/test.woff);} /*! test_font_face: @font-face {src: local("Test");} */ @font-face {src: local("Test");} /*! test_font_face: @font-face {src: local("Foo Bar");} */ @font-face {src: local("Foo Bar");} /*! test_font_face: @font-face {src: local(Test);} */ @font-face {src: local(Test);} /*! test_font_face: @font-face {src: local(Foo Bar);} */ @font-face {src: local(Foo Bar);} /*! test_font_face: @font-face {src: url("test.woff") format(woff);} */ @font-face {src: url("http://example.test/test.woff") format(woff);} /*! test_font_face: @font-face {src: url("test.ttc") format(collection), url(test.ttf) format(truetype);} */ @font-face {src: url("http://example.test/test.ttc") format(collection), url(http://example.test/test.ttf) format(truetype);} /*! test_font_face: @font-face {src: url("test.otf") format(opentype) tech(features-aat);} */ @font-face {src: url("http://example.test/test.otf") format(opentype) tech(features-aat);} /*! test_font_face: @font-face {src: url("test.woff") format(woff) tech(color-colrv1);} */ @font-face {src: url("http://example.test/test.woff") format(woff) tech(color-colrv1);} /*! test_font_face: @font-face {src: url("test.woff2") format(woff2) tech(variations);} */ @font-face {src: url("http://example.test/test.woff2") format(woff2) tech(variations);} /*! test_font_face: @font-face {src: url("test.woff") format(woff) tech(palettes);} */ @font-face {src: url("http://example.test/test.woff") format(woff) tech(palettes);} /*! test_font_face: @font-face {src: url("test.woff") format(woff) tech(features-opentype, color-sbix);} */ @font-face {src: url("http://example.test/test.woff") format(woff) tech(features-opentype, color-sbix);} /*! test_font_face: @font-face {src: url("test.woff") format(woff) tech(incremental, color-svg, features-graphite, features-aat);} */ @font-face {src: url("http://example.test/test.woff") format(woff) tech(incremental, color-svg, features-graphite, features-aat);} /*! test_font_face: @font-face {src: url("foo.ttf") format(opentype) tech(color-colrv1);} */ @font-face {src: url("http://example.test/foo.ttf") format(opentype) tech(color-colrv1);} /*! test_font_face: @font-face {src: url("foo.ttf") tech(color-SVG);} */ @font-face {src: url("http://example.test/foo.ttf") tech(color-SVG);} /*! test_font_face: @font-face {src: url("foo.ttf") tech(palettes color-colrv0 variations) format(opentype);} */ @font-face {src: url("http://example.test/foo.ttf") tech(palettes color-colrv0 variations) format(opentype);} /*! test_font_face: @font-face {src: local("") url("test.woff");} */ @font-face {src: local("") url("http://example.test/test.woff");} /*! test_font_face: @font-face {font-weight: 200 400} */ @font-face {font-weight: 200 400} /*! test_font_face: @font-face {font-weight: 400 400} */ @font-face {font-weight: 400 400} /*! test_font_face: @font-face {font-stretch: 50% 200%} */ @font-face {font-stretch: 50% 200%} /*! test_font_face: @font-face {font-stretch: 50% 50%} */ @font-face {font-stretch: 50% 50%} /*! test_font_face: @font-face {unicode-range: U+26;} */ @font-face {unicode-range: U+26;} /*! test_font_face: @font-face {unicode-range: u+26;} */ @font-face {unicode-range: u+26;} /*! test_font_face: @font-face {unicode-range: U+0-7F;} */ @font-face {unicode-range: U+0-7F;} /*! test_font_face: @font-face {unicode-range: U+0025-00FF;} */ @font-face {unicode-range: U+0025-00FF;} /*! test_font_face: @font-face {unicode-range: U+4??;} */ @font-face {unicode-range: U+4??;} /*! test_font_face: @font-face {unicode-range: U+400-4FF;} */ @font-face {unicode-range: U+400-4FF;} /*! test_font_face: @font-face {unicode-range: U+0025-00FF, U+4??;} */ @font-face {unicode-range: U+0025-00FF, U+4??;} /*! test_font_face: @font-face {unicode-range: U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F;} */ @font-face {unicode-range: U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F;} /*! test_font_face: @font-face {unicode-range: U+????;} */ @font-face {unicode-range: U+????;} /*! test_font_face: @font-face {unicode-range: U+0000-FFFF;} */ @font-face {unicode-range: U+0000-FFFF;} /*! test_font_face: @font-face {unicode-range: U+10????;} */ @font-face {unicode-range: U+10????;} /*! test_font_face: @font-face {unicode-range: U+100000-10FFFF;} */ @font-face {unicode-range: U+100000-10FFFF;} /*! test_font_face: @font-face {unicode-range: U+1e1e?;} */ @font-face {unicode-range: U+1e1e?;} /*! test_font_face: @font-face {unicode-range: u+????, U+1????, U+10????;} */ @font-face {unicode-range: u+????, U+1????, U+10????;}