There are some extra features that CSS::Prepare uses when parsing your style sheets.
When optimising it can be useful to specifically chunk your content (see "Separate parts of the output" for more on this). This can be done by marking the end of any rule sets you need to be chunked separately with a comment containing just two or more hyphens.
li { margin: 0; } /* -- */ h1 { margin: 0; }
Sometimes you actually need to include a comment in the output, for things such as stating licensing terms. Any block-level comment with an exclamation mark as the very first character in the comment is preserved in the output, just with the exclamation mark removed.
/*! 'Museo' Font by Jos Buivenga (exljbris) * -> www.exljbris.com */ @font-face { font-family: 'Museo'; ... }
/* 'Museo' Font by Jos Buivenga (exljbris) * -> www.exljbris.com */ @font-face{font-family:'Museo';...}
Any CSS that cssprepare does not understand is automatically discarded. If you need to include some rule sets that the parser does not understand, you can do this by starting them with a special marker comment and ending with a chunk marker, and cssprepare will just pass the content through unchanged.
/*! verbatim */ #problematic { border-radius: 5px; } /* -- */
To install CSS::Prepare, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CSS::Prepare
CPAN shell
perl -MCPAN -e shell install CSS::Prepare
For more information on module installation, please visit the detailed CPAN module installation guide.