webpage2html icon indicating copy to clipboard operation
webpage2html copied to clipboard

Imported CSS styles

Open aplicacionamedida opened this issue 8 years ago • 3 comments

The code doesn't handle the @import css rule, to embed other css style inside a css style. https://developer.mozilla.org/en/docs/Web/CSS/@import

This feature is critical to create a single html file correctly.

The equivalent webpage2html in node.js handle this case: https://github.com/remy/inliner/blob/master/lib/css.js

It's also interesting to add the feature of minification.

aplicacionamedida avatar Jul 18 '17 19:07 aplicacionamedida

Yeah you are right, recursive css @import is important, yet hard to implement. Let me take some time to think it over.

zTrix avatar Jul 20 '17 01:07 zTrix

Hi I know that my question is out of the topic of this issue, but... Do you know any alternative to zTrix/webpage2html and remy/inliner written in PHP? BTW, thanks for awesome library, it just works out of the box. My need of PHP is that I would like to implement it into Wordpress plugin

gitowiec avatar Oct 22 '17 13:10 gitowiec

@gitowiec The code and logic is not complicated, maybe a full rewrite in PHP is not that hard?

zTrix avatar Oct 29 '17 17:10 zTrix