If I have a CSS file (main.css) with the following content:
@import url('../styles/global/reset.css');
@import url('/styles/themes/helloWorld/structure.css');
@import url('/styles/themes/helloWorld/presentation.css');
Is it possible to create a PHP file that is give the location of main.css and have it read all of the imported files?
I assume, I start with something like this:
$handle = fopen($_SERVER['DOCUMENT_ROOT'] . '/styles/themes/helloWorld/main.css', 'r');
Try PHP CSS Parser – https://github.com/sabberworm/PHP-CSS-Parser