kasparsd / minit

A WordPress plugin to combine CSS and Javascript files.
GNU General Public License v2.0
286 stars 46 forks source link

Add support for @import rules #65

Closed sidati closed 8 years ago

sidati commented 8 years ago

Hello @kasparsd,

As we all know some stylesheets has @import functions, and we also know that @import works only if its on top, for the moment MINIT doesn't move @import functions to the beginning of the minified file. BUT it will better if MINIT, just replace the @import with the content from the @imported file.

by the way thanks for the great plugin ;), Sidati

kasparsd commented 8 years ago

Thanks for the suggestion @sidati! I think it's a plugin territory. One could use the minit-content-css filter to do that.

szepeviktor commented 8 years ago

@sidati See https://github.com/markoheijnen/Minit-Pro/blob/master/minit-pro.php#L75

sidati commented 8 years ago

@kasparsd , but what is the deal of keeping @import if it dosent work ?? You must at least move it to the beginning of content.

szepeviktor commented 8 years ago

Maybe a decent CSS file has no @import-s.

kasparsd commented 8 years ago

@sidati I personally don't use @import so if you could create a pull request, I would have a look.

sidati commented 8 years ago

@kasparsd, OK, and please take look at line 564 (latest stable version), cause there is no such action minit-cache-purge-delete, maybe you meant : minit-cache-purged in 548.

kasparsd commented 8 years ago

@sidati Minit won't delete old cache files under any circumstances so we offer a sample action that can be used by other plugins to do that instead.

sidati commented 8 years ago

@kasparsd got it

sidati commented 8 years ago

Take a look when you have a time : https://github.com/sidati/minit/commit/3f0f618746f3a172b53582f24405977e8517a229