Synopsis
use CSS::Parser::Regexp;
use Data::Dumper;
$\ = "\n";
my $css = <<CSS
.someclass {
color: limegreen;
font-size: 12pt;
}
CSS
;
my $p = CSS::Parser::Regexp->new;
$p->parse($css);
print Dumper($p->rules);
print Dumper($p->to_tree);
print $p->stringify;
Description
A regexp-based CSS parser with at-rule support
Key features:
- only core dependencies
- support for nested at-rules
- tree and list structure output
- stringification (and as a consequence, de-obfuscation)
- tested against bootstrap.css, normalize.css, pure.css
I'd welcome feedback and comments. I'm especially interested to know if this group feels it's good enough to upload to CPAN, and if there is a better name I should use (see briandfoy's comment here
Comments
Please sign up to post a review.