cjmarkham / css-compiler
A CSS Compiler for Silex
dev-master
2013-05-10 19:03 UTC
Requires
- silex/silex: ~1.0
This package is not auto-updated.
Last update: 2024-12-30 15:09:52 UTC
README
A css compiler for silex
Registering
In composer.json add this to your dependencies
"cjmarkham/css-compiler": "dev-master"
Then to register
$app->register(new CssCompiler\CompilerServiceProvider());
Options
compiler.shorten_hex
- Shorten hexadecimal values. Defaultfalse
compiler.short_values
- Shorten values. Eg\margin:10px 0 10px 0
tomargin:10px 0
Defaulttrue
compiler.remove_empty
-Removes empty rules. Defaultfalse
compiler.remove_units
- Remove un-needed units. Eg\0px
to0
Defaulttrue
compiler.rgb_to_hex
- Converts rgb values to hex values. Defaultfalse
compiler.input_dir
- The directory containing your css.Required
compiler.output_path
- The path to save compiled css to. Defaultcompiler.input_dir / compiled.css
Usage
$app->register(new CssCompiler\CompilerServiceProvider(), array(
'compiler.shorten_hex' => true,
'compiler.rgb_to_hex' => true,
'compiler.remove_empty' => true,
'compiler.input_dir' => __DIR__ . '/css',
'compiler.output_path' => __DIR__ . '/css/compiled.css'
));
$app['compiler']->compile();