Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

css::minifier(3pm) [debian man page]

CSS::Minifier(3pm)					User Contributed Perl Documentation					CSS::Minifier(3pm)

NAME
CSS::Minifier - Perl extension for minifying CSS SYNOPSIS
To minify a CSS file and have the output written directly to another file use CSS::Minifier qw(minify); open(INFILE, 'myStylesheet.css') or die; open(OUTFILE, 'myStylesheet.css') or die; minify(input => *INFILE, outfile => *OUTFILE); close(INFILE); close(OUTFILE); To minify a CSS string literal. Note that by omitting the outfile parameter a the minified code is returned as a string. my minifiedCSS = minify(input => 'div {font-family: serif;}'); To include a copyright comment at the top of the minified code. minify(input => 'div {font-family: serif;}', copyright => 'BSD License'); The "input" parameter is manditory. The "output" and "copyright" parameters are optional and can be used in any combination. DESCRIPTION
This module removes unnecessary whitespace from CSS. The primary requirement developing this module is to not break working stylesheets: if working CSS is in input then working CSS is output. The Mac/Internet Explorer comment hack will be minimized but not stripped and so will continue to function. This module understands space, horizontal tab, new line, carriage return, and form feed characters to be whitespace. Any other characters that may be considered whitespace are not minimized. These other characters include paragraph separator and vertical tab. For static CSS files, it is recommended that you minify during the build stage of web deployment. If you minify on-the-fly then it might be a good idea to cache the minified file. Minifying static files on-the-fly repeatedly is wasteful. EXPORT None by default. Exportable on demand: minifiy() SEE ALSO
This project is developed using an SVN repository. To check out the repository svn co http://dev.michaux.ca/svn/random/CSS-Minifier You may also be interested in the JavaScript::Minifier module also available on CPAN. AUTHORS
Peter Michaux, <petermichaux@gmail.com> COPYRIGHT AND LICENSE
Copyright (C) 2007 by Peter Michaux This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available. perl v5.12.3 2007-08-03 CSS::Minifier(3pm)

Check Out this Related Man Page

CSS::Style(3pm) 					User Contributed Perl Documentation					   CSS::Style(3pm)

NAME
CSS::Style - A ruleset in a CSS object tree SYNOPSIS
use CSS; DESCRIPTION
This module represents a ruleset in a CSS object tree. Read the CSS.pm pod for information about the CSS object tree. METHODS
CONSTRUCTORS "new()" or "new( { ..options.. } )" This constructor returns a new "CSS::Style" object, with an optional hash of options. adaptor adaptor to use for serialization ACCESSORS "add_selector( $selector )" This method adds a selector to the selector list for the object. $selector is a reference to a CSS::Selector object. "add_property( $property )" This method adds a selector to the property list for the object. $property is a reference to a CSS::Property object. "set_adaptor( 'CSS::Adaptor::Foo' )" This method sets the current adaptor for the object. "selectors()" This method is used to serialize the ruleset's selectors, using the current adaptor. It returns a string which come from the adaptor's "output_selectors()" method. "properties()" This method is used to serialize the ruleset's properties, using the current adaptor. It returns a string which come from the adaptor's "output_properties()" method. "to_string()" This method is used to serialize the ruleset, using the current adaptor. It returns a string which comes from the adaptor's output_rules() method. "get_property_by_name( 'property_name' )" Returns the first CSS::Property object with the specified name. Returns zero on failure. AUTHOR
Copyright (C) 2003-2004, Cal Henderson <cal@iamcal.com> SEE ALSO
CSS, http://www.w3.org/TR/REC-CSS1 perl v5.14.2 2008-04-23 CSS::Style(3pm)
Man Page