CssToInlineStyles icon indicating copy to clipboard operation
CssToInlineStyles copied to clipboard

<script> tag styling

Open tillkruss opened this issue 7 years ago • 4 comments

We have JSON-LD script tags in our emails and they get a style attribute added to them, which doesn't make sense.

<script type="application/ld+json" style="font-family: Avenir, Helvetica, sans-serif; box-sizing: border-box;">
{
    "@context": "http://schema.org",
    "@type": "EmailMessage",
    "potentialAction": {
        "@type": "ConfirmAction",
        "name": "Approve Expense",
        "handler": {
            "@type": "HttpActionHandler",
            "url": "https://myexpenses.com/approve?expenseId=abc123"
        }
    },
    "description": "Approval request for John\u2019s $10.13 expense for office supplies"
}
            </script>
</body>
</html>

tillkruss avatar Nov 20 '17 03:11 tillkruss

Could it be that you have a * {}-statement in your css file? Probably a reset-file. Also, why using ld+json in emails? I don't think there is a mailclient that supports it.

tijsverkoyen avatar Jan 24 '18 13:01 tijsverkoyen

Gmail does : https://developers.google.com/gmail/markup/

TerraSkye avatar Dec 18 '18 12:12 TerraSkye