YUI-CSS-compressor-PHP-port
YUI-CSS-compressor-PHP-port copied to clipboard
A PHP port of the YUI CSS compressor.
Since Java version has the same output, it's not a bug. Just a suggestion for improvement. Input: ```css section a :not( .one , .two , [ data-x = " ab...
There are a couple of minor PHP 7.2 incompatibilities in this project, both in gui/index.php: ini_set('magic_quotes_sybase', 0); --> this directive has been removed. I guess it's safe also to disable...
Has seen on https://bugs.php.net/bug.php?id=81424 On line: https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/blob/3cbf557f4079d83a06f9c3ff9b957c022d7805cf/src/Minifier.php#L729 The following regex `/[^{};\/\n]+\{\}/S` is not optimal with PCRE2 10.35+ (100 times slower) it should be rewrite. The solution proposed on the PHP...
When minifying CSS, color values using RGB are breaking. An example is: Pre-minification: background: rgb(255, 255, 255, 1.0) !important; Post-minification: background: #ffffff01 !important; Compressing the RGB value seems to work...
I discovered the following issue with CSS calc and white spaces which breaks your styles in some browsers (e.g. Chrome) while others will work fine (e.g. Firefox): Pure CSS `width:...
Input ``` /* test */ /*! test */ .test { /* test */ /*! test */ color: #111; background-color: #fff; } ``` Expected output ``` /*! test */ .test{/*! test...
Basic test case included for now.
If you run this: ```php $minifier = new \tubalmartin\CssMin\Minifier(); $minifier->run('#id {'); ``` Then `Minifier::processRuleBodies()` will get itself into an infinite while-loop, because it does not consider that `$blockEndPos` may be...
There are some little changes in PHP 7.4 with could break the normal usage of cssmin. Perhaps these things can be fixed: - `get_magic_quotes_gpc()` is `deprecated`, see https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/blob/master/gui/index.php#L41
sometimes, `@media` queries are redundant, especially when generated by CSS preprocessors which support nested media queries. eg: ```` @media screen and (min-width: 768px) and (min-width: 800px) { ... } ````...