Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Font-Awesome doesn't work #47

FirePanther opened this Issue · 6 comments

2 participants


this tool is awesome, but in font-awesome it doesn't work (the icons aren't visible anymore).
Here the diffs:
left the crushed version, right the original one.
I deactivated csscrush for a few files now.


I can't find any issue with the current version of font-awesome.css (v3.1.0).. Are you using the latest version of both libraries?


it works now, but i dont know why it works, i didnt changed anything.
maybe a cache problem (the font was loading or so).
thank you, sorry for the mistake.
and thank you very much for this script, i really love and use it:


i know the reason now, i had this problem again.
with ::string it works, with ::file it doesnt.
it sets the path wrong (doesnt matter what value rewrite_import_urls has or what document root i set).
i dont need this feature, so i commented $this->evaluate(); in file Url.php :)

@FirePanther FirePanther reopened this

Can you post some more information about your setup, and perhaps the code you're using?



require_once 'csscrush/CssCrush.php';
$sData = csscrush::file('/css/'.$sFile, array(
'doc_root' => dirname(file).'/../',
'output_dir' => 'cache'
$sData = substr($sData, 1);
$iLastMod = substr($sData, strpos($sData, '?') + 1);
$sCrushFile = substr($sData, 0, strpos($sData, '?'));
$sEtag = hash('crc32b', $sCrushFile.'-'.$iLastMod);
$sSource = file_get_contents('cache/'.$sCrushFile);

my css structure:


Hi, after looking at this there are a few minor changes you need to make to make this work...

You can drop the doc_root argument as it's not required, if you decide to use it, wrap the path in realpath(). Secondly the output_dir option needs to be an absolute path. The following works for me:

$sData = csscrush::file('/css/style.css', array(
    'output_dir' => __DIR__ . '/cache'

After that the following line:

$sSource = file_get_contents('cache/'.$sCrushFile);

Should probably be (without the 'cache/' prefix):

$sSource = file_get_contents($sCrushFile);
@peteboere peteboere closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.