You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but if you remove one random selector from the @media query block (ie .pure-form .pure-help-inline,) from that, it works again and the .email-body {} and below are being used. If it is as-is above, it remove all styles and .email-body isn't inlined.
Is there something wrong with the RegExp stripping out the media queries?
The text was updated successfully, but these errors were encountered:
Yep, stripping media queries is quite a problem, because you have to somehow inject them into converted HTML. There should be some option to keep CSS styles in head section since some e-mail clients supports them.
My site uses the PureCSS framework, I use php to
include()
this library inside a <style> block of my html email. At:CssToInlineStyles.php:441
$css = preg_replace('/@media [^{]*{([^{}]|{[^{}]*})*}/', '', $css);
it's returning
$css == null
and stripping out everything including non-media queries.I've stripped down the CSS to just this, and it is still failing:
but if you remove one random selector from the @media query block (ie
.pure-form .pure-help-inline,
) from that, it works again and the .email-body {} and below are being used. If it is as-is above, it remove all styles and .email-body isn't inlined.Is there something wrong with the RegExp stripping out the media queries?
The text was updated successfully, but these errors were encountered: