Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2020-02-17 (23 hours ago) | | Not enough user ratings | | Total: 188 This week: 7 | | All time: 8,372 This week: 55 |
|
Description | | Author |
This package can optimize CSS files removing redundant data.
It can take a given CSS file and parse it to be rewritten combining duplicate selectors, extracting duplicate CSS properties and values, minifying the CSS removing white space and comments.
The optimized CSS can be rewritten as CSS or SCSS Innovation Award
December 2016
Number 6
Prize: PhpStorm IDE 1 year individual subscription |
There are many CSS file optimization solutions, but most do not do much more than removing white space and comments.
This package can also optimize CSS files combining duplicated selectors and removing duplicated property values.
Manuel Lemos |
| |
|
|
Innovation award
Nominee: 4x |
|
Details
CssOptimizer
Optimizes CSS (combines duplicate selectors, extracts duplicate css properties and values, minifies the css).
Render minified CSS:
$optimizer = new Jelle_S\CssOptimizer\CssOptimizer($css);
file_put_contents('style.min.css', $optimizer->renderMinifiedCSS());
Render SCSS from your css:
$optimizer = new Jelle_S\CssOptimizer\CssOptimizer($css);
file_put_contents('style.scss', $optimizer->renderSCSS());
This code is open source (GPL-3.0), however, if you like this class and you would like to sponsor the developer (me), feel free to .
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.