Is GMail now honoring embedded CSS rules?
I just noticed in testing a new HTML email template that all of my tests sent to GMail accounts are respecting my CSS type styles (as declared via embedded CSS rules). I've found next to zero documentation of this and even the GMail tests simulated via Litmus are not showing my CSS-styled text.
I am hesitant to actually code an email blast using this more efficient approach (vs inline styles) until I can confirm that GMail has definitely changed how they pre-process inbound HTML email.
Just for the record, I am defining styles for body, p, h4, and li tags, and am not defining any specific classes beyond that, and I've placed the < style > declarations first thing inside the < body > tag instead of inside the < head >. This seems to be working for me...
Are other people also seeing this? GMail used to strip everything but the most basic inline CSS. Has anyone seen Google document this change anywhere?
Recently we found that Gmail does indeed respect styling in the head on elements, not classes. But it didn't work in Google Apps mail which is obviously very sad.
The Litmus test engine uses Google Apps Mail (as @stigm discovered recently https://twitter.com/stigm/status/436067184725749760) which was still stripping the style tags, hence why it wouldn't work in Litmus.
If you have suggestions on things to test, I'd love to know. So far what I've sent a test to a Gmail account, a Google Apps account and ran an inbox inspection.
Curious about the classes, I switched to using a class before running these tests. This is my "template": http://codepen.io/dandenney/pen/rDEgI
From what I can see, the styles set to a class are being used.
I haven't seen any documentation but you're onto something. I had a test template I was using today and I threw some hideous styles in there to test.
Pen of full code
More on this: I've tested this by sending the same HTML via both Vertical Response and MailChimp, and have looked at GMail via IE9, IE8, and IE7 on Windows7, and on Chrome, Firefox, and Safari on Mac OSX -- and GMail looked great in all except IE7. Outlook, Yahoo Mail, and even Hotmail seem to work too. I noticed that GMail did strip my < head > and < body > tags, but left my < script > declarations that were in the head intact.
The HTML code I've tested is here: http://pastebin.com/da8vMwLR