Skip Menu |

This queue is for tickets about the CSS-Inliner CPAN distribution.

Report information
The Basics
Id: 105834
Status: rejected
Priority: 0/
Queue: CSS-Inliner

People
Owner: Nobody in particular
Requestors: joe.ecob [...] spareroom.co.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Un-parsed CSS (with media attribute) is being removed
Date: Mon, 13 Jul 2015 11:49:13 +0100
To: bug-CSS-Inliner [...] rt.cpan.org
From: Joe Ecob <joe.ecob [...] spareroom.co.uk>
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
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
From reporter: Hi, I contacted you a while back about an issue with CSS::Inliner: https://rt.cpan.org/Public/Bug/Display.html?id=105834 I've just found the ticket after looking at CSS::Inliner again, and to be honest I'm not 100% sure what the actual issue was. Either way, it seems like it's not an issue anymore, would you be able to delete / close the ticket please? Thanks, Joe On Tue Nov 10 19:21:10 2015, KAMELKEV wrote: Show quoted text
> 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:
> > 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