CSS Inliner Rewriter - adobe/aem-core-email-components GitHub Wiki
Takes the HTML output of the page and inlines all CSS in as HTML attributes:
- Rewrite the output to move every CSS ruleset to the targeted elements as an HTML
styleattribute.- Properly handle quotes, like:
font-family: 'Timmana', "Gill Sans", sans-serif; - Accept also browser-specific rules, like:
-ms-interpolation-mode: bicubic; - Preserve duplicate properties, like:
display: inline-block; display: block; - Preserve capitalization as-is, like:
Margin: 0px;
- Properly handle quotes, like:
- Keep the original
styleelement in the HTML as-is in order to:- Preserve media queries, web fonts, and animations by not removing from the style element any “@” declaration.
- Preserve unmatched CSS rules, like the Outlook
.ExternalClassclass name. - Preserve CSS pseudo-selectors, like
a:hoverorp::before.
- Leave client-specific comments untouched, like:
<!--[if mso]><style>.hide-mso { display: none; }</style><![endif]-->