/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/css/minimize/style.css
62 строки
1 KB
Alexander Akait
feat(css): fold CSS math functions over constant operands (#21596)
04 авг 2026, 01:58
Не верифицирован
04 авг 2026, 01:58
b9c3751
Код
Авторство
О чём код?
/*! license: keep me */ /* drop this comment */ .a , .b { color : red ; background : url(./img.png) ; } /* Declaration `:` trim, comma spacing, custom-property verbatim, !important, a function's comma spaces, calc() operator spaces, and combinators — every one a safety case the minifier must get exactly right. */ .c > .d , .e { --custom : a b ; margin : 0 auto ; color : rgb(1, 2, 3) !important ; width : calc( 1em + 2px ) ; } /* Safe value transforms: number normalization, hex shortening, rgb()/hex color minification — each value-identical. Custom properties, ids and hsl()/rgba() with alpha are deliberately left untouched. */ .transforms { color : #FF0000 ; background : #AABBCC ; background-image : linear-gradient( #AABBCC , #FF0000 ) ; border-color : rgb(0, 128, 128) ; margin : 0.50px 1.0px 0 ; --raw : 0.50 ; fill : hsl(0, 100%, 50%) ; stroke : rgba(0, 0, 0, 0.5) ; outline-color : rgba(0, 0, 0, 0) ; } #ABCDEF { x : 1 ; } /* Input the CSS grammar rejects (an IE star hack) is still carried through verbatim — minifying must never drop what the unminified asset keeps. */ .hacks { *zoom : 1 ; _height : 1px ; color : red ; } :not( .f ) .g { content : "; } , keep {" ; } /* Interleaved declaration / nested-rule order must be preserved. */ .h { color : red ; .i { x : 1 } color : green ; } @media screen and ( min-width : 100px ) { .a { content : "; } , keep {" ; } }