logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

CSS::LESSp - LESS for perl. Parse .less files and returns valid css (lesscss.org for more info about less

Author

       Ivan Drinchev <drinchev@gmail.com>

Bugs

       a ) You can not import other less files ...

       You can't do this

         @import url('/other.less')

       It might be added in future versions

       b ) You can not use hsl as a color

       You can't do this

         color: hsl(125,125,125);

       All other bugs should be reported via <http://rt.cpan.org/Public/Dist/Display.html?Name=CSS-LESSp> or
       bug-CSS-LESSp@rt.cpan.org.

Contributors

       People who've helped with this project :

       Michael Schout <mschout@gkg.net>

Description

       This module is designed to parse and compile .less files in to .css files.

       About the documentation and syntax of less files please visit lesscss.org

Difference With The Original Less For Ruby

       What is the benefits of LESS for perl ...

       It's extremely fast :

         # time ./lessp.pl big.less > big.css

         real    0m2.198s
         user    0m2.174s
         sys     0m0.020s

         # time lessc big.less big.css

         real    0m18.805s
         user    0m18.437s
         sys     0m0.184s

Methods

parse

       Main parse method, returns array of the css file

       copyFunctioncopyTodump=head3getSelector=head3getValue=head3getVariable=head3insertChild=head3insertFunction=head3insertRule=head3insertVariable=head3isFunction=head3new=head3process

Name

       CSS::LESSp - LESS for perl. Parse .less files and returns valid css (lesscss.org for more info about less
       files)

Synopsis

         use CSS::LESSp;

         my $buffer;
         open(IN, "file.less");
         for ( <IN> ) { $buffer .= $_ };
         close(IN);

         my @css = CSS::LESSp->parse($buffer);

         print join("", @css);

       or you could simply use the lessp.pl tool in the package

         $ lessp.pl css.less > css.css

See Also