jelle-s / cssoptimizer
Optimizes & minifies css files or strings.
1.0.0
2016-12-26 09:37 UTC
Requires
- jelle-s/arraykeycombiner: ^1.0
- nicmart/tree: ^0.2.7
- sabberworm/php-css-parser: ^8.1
This package is auto-updated.
Last update: 2024-12-12 22:07:56 UTC
README
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 .