Question

As a lot of you, i have one css file regrouping all css file of my website using

@import

I know this is not the best way to do, especially if we are looking to gain transaction performance between client and server (less queries, less weight) but in my situation the visitor will certainly (in most of time) brought to visit all the page of my website, so including all the css file for all the page isn't a very bad choice

But doing that with the import method, the client will query each file, exemple my global.css file contains :

@import 'test.css' @import 'index.css' @import 'love.css'

The client will query global.css, test.css, index.css and love.css

I'm wondering if there is a way or a module in linux (my dedicated server is a debian 6.0) to automatically include all css of test.css, index.css, love.css into global.css

Then the client will query only one file, global.css, which will contain all the css code

I know there is some easy ways/software to compile multiple css file into one css file, but i'm looking to something which can do this automatically in server side

Regards,

Était-ce utile?

La solution

LessCSS has a PHP implementation that's about as portable as it gets.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top