You can use the version of PHP LESS. It will handle the styles in the style file and imported into a single file inside the server itself. You can minimize it. Then save it in the cache. This will allow the LessPHP compiler to see if the processed file was already in the cache and if any of the associated stylesheets were modified. If nothing has changed, it will simply return the file in cache style. The only difference you need to make in the markup is to change the .css to .less in the <link> . It will also help you write LESS css, which is a bonus.
Detailed documentation on how to install LessPHP, autocompile and cache LESS files is given on the official website and on GITHub .
source share