Does it handle imports and adjust urls? #2

Closed
balupton opened this Issue May 31, 2011 · 7 comments

3 participants

@balupton

No description provided.

@GoalSmashers
Collaborator

It does not handle imports as it's been created to optimize CSS declarations only.
For adjusting URLs, embedding images you can try enhance-css or the assets-packager if you need an all-in-one solution to putting all your CSS and JS together.

https://github.com/GoalSmashers/enhance-css
https://github.com/GoalSmashers/assets-packager

@balupton

Thanks mate.

Looking at the enhance-css code, it does handle embedding images, but doesn't seem to handle doing the following:

Say if I have the following:

style.css

@import 'a.css';
@import 'b.css';

to:

/* the contents of a.css */
/* the contents of b.css */

Is this planned at some point?

@GoalSmashers
Collaborator

Right, it doesn't work at the moment, as we don't use @import's at all at GoalSmashers (as we use Less extensively).
But it definitely should be there as it's a core CSS feature.

Could you do us a favor and open a ticket in enhance-css repository?
We should have some spare time this week time to work on it.

@fiznool

Hello. I'm just wondering if this was ever addressed? I'm currently looking at using the Backbone Boilerplate Grunt tasks and it would be awesome if the clean-css task could follow @import URLs, similar to how the RequireJS r.js optimiser works.

Thanks!

@GoalSmashers
Collaborator
@GoalSmashers GoalSmashers added a commit that closed this issue Mar 21, 2013
@GoalSmashers GoalSmashers Fixes #2 - resolving @import rules.
* Supporting both relative and absolute paths (via `-r` / `root` options).
4309611
@GoalSmashers
Collaborator

@balupton, @fiznool - we are sorry it took so long, but it's finally there. It will be released with clean-css 1.0 in the coming days.

@balupton

Woot woot woot! Looking forward to it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment