inline-css icon indicating copy to clipboard operation
inline-css copied to clipboard

Do not combine css properties

Open Kaless1n opened this issue 8 years ago • 4 comments

To stop underlining links in Outlook web app you have to set the following rule:

a {
    text-decoration: none !important;
    text-decoration: none;
    }

What i get after running inline-css plugin is: <a style=" text-decoration: none;"> I think this plugin should not be so smart and should inline my css as it is leaving both rules in same order.

It would be great if you will add such option to API or point me at module which is responsible for combining css properties.

Kaless1n avatar May 27 '16 14:05 Kaless1n

+1

podorozhny avatar Jun 09 '16 14:06 podorozhny

Why not just fix it manually after inline-css has run? eg: html = html.replace('text-decoration: none;','text-decoration: none;text-decoration: none !important;')

This seems wiser than making a module work less well for the sake of an application with it's own weird rules. I can sympathise, Outlook is horrible, but that's no reason to break good css parsing.

daveycakes avatar May 25 '17 16:05 daveycakes

+1

I have the same problem when implementing fallback for background-image:

background: #ffffff;
background: url();

Thanks!

alenvuletic avatar Jul 18 '17 09:07 alenvuletic

@daveycakes I would recommend the issuer of this issue to create a separate package doing such post processing for emails only. Keep in mind that inlining CSS is not only for email purposes, so I totally agree that such email client hacks should not be considered in this package.

tommedema avatar Oct 15 '17 08:10 tommedema