Hi Joe,
I'm not really understanding what you are asking for here. Maybe you can provide a test, and ideally a patch that would more clearly demonstrate what you're looking for?
I don't at all see how passing a custom HTML::Tree would help here, and more to the point, I'm removing the ability to do this, so I strongly encourage you to avoid use that feature.
CSS::Inliner is at a point in it's development where several competing goals are now starting to cause issues with how the product works. For example I allowed people to pass in a custom HTML::Tree, but doing so prevents the tool from working with HTML5 elements at all, which then causes people to submit various bug reports to me. There are similar issues with utf8 (the next major feature to be added) that are basically unresolvable, so my plan is actually to remove these discretionary features entirely, and provide a "just works" solution for the average case.
Regarding your specific issue, please do provide the materials suggested above, and I'll see what I can do.
thanks,
Kevin
On Mon Jul 13 06:49:35 2015, joe.ecob@spareroom.co.uk wrote:
Show quoted text> CSS::Inliner - 3958
> Perl v5.20.2
>
> `sub _parse_stylesheet` checks for media attributes (line 762) but
> removes the css regardless of whether it has been parsed or not (line
> 773)
>
> Say I have a block of CSS containing media queries specific to mobile
> devices that I don't want to be inlinified, I want to set a media type
> of 'handheld' (i.e. not matching screen/all/undefined) which doesn't
> get stripped out from the source. Having to pass a HTML::Tree to
> negate this issue seems too heavy
>
>
> <style type="text/css" media="all"> - Get's parsed and removed
>
> <style type="text/css" media="handheld"> - Doesn't get removed or
> parsed
>
>
> Thanks,
> Joe