CSS::Inliner tries to inline various pseudo attribute selectors (like
"a:visisted") that would be impossible to inline because they can't be
mapped until the document is interacted with. It also causes problems
for HTML::Query since it can't handle them.
The attached patch fixes this so that they are just skipped when inlining.
Subject: | pseudo_element_skips.patch |
--- Inliner.pm 2010-01-19 14:00:19.000000000 -0500
+++ Inliner.pm.new 2010-02-12 14:24:36.217132987 -0500
@@ -175,6 +175,7 @@
my $tree = $self->{html_tree};
foreach my $key (keys %{$css}) {
+ next if $key =~ /\w:(?:active|focus|hover|link|visited)\b/;
my $elements = $tree->query($key);
#if an element matched a style within the document, convert it to inline