Styliner
Styliner copied to clipboard
Comparison to Juice
Styliner is better for handling media queries. Because Juice will ignore them. Styliner is preserving them in style tags, so that they are used by email clients who don't throw away the style tags.
There is also juice2 which has an option to preserve media queries.
I wrote the differences between the libraries in here:
juice. 1.7Mb with dependencies.juice2. 5.9Mb with dependencies. This is a fork of juice, seems to be containing more options than juice. This one doesn't drop media queries as juice does. Sorts inline css rules alphabetically.styliner. 4.0Mb with dependencies. This one uses promises instead. Have a couple of different options than juice2. Has acompactoption that other ones don't have that minifies the html. Doesn't read the html file itself as others do. Also extendsmarginandpaddingshorthands.
Juice removes pseudo-classes whereas Styliner preserves them in <style>