cssprepare - pre-process CSS style sheet(s)
cssprepare [-afhoqwx] [-b dir] [-d dir] [-l path] [-s secs] [-t secs] style sheet [...]
cssprepare [--long-options ...] style sheet [...]
cssprepare concatenates and minifies multiple cascading style sheets into one, optionally adding new features to the CSS syntax and optimising the result to save as much space as possible.
When automatically creating the output style sheet (
use the entire SHA1 checksum as the filename rather than truncating it to five characters.
Use dir as the hierarchy base. See "Using hierarchical CSS" for more details.
Automatically create a file in dir with the CSS output. This filename will be based upon the first five characters of the SHA1 checksum of the content. This means repeated runs of cssprepare on the same files will only generate one output file, which is useful when using cssprepare as part of a deployment script. See "Deploying CSS" for more details.
Turn on the extra features that cssprepare uses when parsing CSS. See "Extending the CSS syntax" for details.
Turn off support for the "star" and "underscore" CSS hacks, and the "zoom" and "filter" properties (the most common of the work-arounds needed to deal with earlier version of Internet Explorer). See "Supported CSS hacks" for more details.
Set the hierarchy location to dir. See "Using hierarchical CSS" for more details.
Attempt to optimise the structure of the CSS before outputting it. Warning: this can break your CSS. See "Optimising CSS" for a longer explanation as to why.
Create the output file file as a named pipe; then enter an infinite loop. This allows you to use cssprepare as a development environment, changing source files and seeing that change immediately reflected next time you read from the named pipe file.
In conjunction with the
specify on which port the server should listen.
Default is to listen on 5000.
Silence the status updates sent to STDERR during processing.
Runs a local web server (using Plack) to deliver the output of the combined style sheets, rather than saving it to a file. This allows you to develop your styles within the context of a web page, and see changes reflected immediately. Set the style sheet link to point to localhost, like so:
<link rel="stylesheet" href="http://localhost:5000/">
You can change the port from 5000 with
Set the length of time that can pass before cssprepare switches optimisation to a faster (but less efficient) method. Note: this applies to each style sheet, not to the length of time cssprepare will run.
Set the length of time that can pass before any HTTP requests will fail when the remote server does not respond.
Only output warnings and errors found in the processed style sheet(s), and set the return value of cssprepare to the number of errors. This is useful for CSS validation.
Exit before producing any output if there were any errors. This is useful for prematurely exiting from automatic build scripts, rather than generating incorrect output.
The only fixed requirement CSS::Prepare has is that the version of the perl interpreter must be at least 5.10.
Some parts of the extended CSS syntax are implemented as optional plugins. For these to work you will need Module::Pluggable installed.
Mark Norman Francis, email@example.com.
Copyright 2010 Mark Norman Francis.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.