News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Automatic CSS3 Prefixer and Compressor
March 20, 2012 @ 12:38:30

On PHPMaster.com today there's a new tutorial showing how to use a little PHP magic to compress your CSS automatically.

There are many ways to compress CSS files or automatically generate browser-specific CSS3 prefixes, but usually extra tools are used which is very annoying. I'd like to show you how such tasks can be done using only PHP.

Complete code for this small script is included in the article. It uses some regular expressions to parse the CSS and does some replacement and removal of things from the CSS content to slim it down and format it all as one line. There are some images illustrating the process also included.

0 comments voice your opinion now!
css compress tutorial prefixer automatic


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: Reading RSS feeds in PHP: Part 2

DevShed: Validating User Input with the Strategy Pattern

Wes Ray's Blog: Configuring Fedora 12 PHP/MySQL Server with Nginx and reverse proxy to Apache

Stoyan Stefanov's Blog: phpBB front-end optimization - 1 hour workshop

Padraic Brady's Blog: Example Zend Framework Blog Application Tutorial: Parts 1-8 Revisited


Community Events





Don't see your event here?
Let us know!


tool update library framework opinion community podcast security voicesoftheelephpant release introduction package composer series laravel language version install interview symfony

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework