cerdic/css-tidy
CSSTidy is a PHP CSS parser and minifier with full CSS3 support. Optimizes and fixes styles without regex for higher reliability. Includes web UI, core parser class, and a standalone CLI (pcsstidy).
CSSTidy is a CSS minifier
This class represents a CSS parser which reads CSS code and saves it in an array. In opposite to most other CSS parsers, it does not use regular expressions and thus has full CSS3 support and a higher reliability. The downside of not using regular expressions is a lower speed though. Additional to that it applies some optimisations and fixes to the CSS code.
include('class.csstidy.php');
$csstidy = new csstidy();
// Set some options :
$csstidy->set_cfg('optimise_shorthands', 2);
$csstidy->set_cfg('template', 'high');
// Parse the CSS
$csstidy->parse($css_code);
// Get back the optimized CSS Code
$css_code_opt = $csstidy->print->plain();
/*! Credits/Licence */Only PHP version is here maintained
Copyright 2005-2007 Florian Schmitz Copyright 2010-2019 Cedric Morin
CSSTidy is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
CSSTidy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Original Tracker : http://sourceforge.net/tracker/?group_id=148404&atid=771415
How can I help you explore Laravel packages today?