leemunroe/responsive-html-email-template

`table[class=body]` causes responsive mobile version not working in iOS Gmail

danielblazquez opened this issue · 6 comments

It seems that Gmail for iOS ignore the table[class=body] properties for mobile-friendly styles.

By removing the atribute selector, the mobile styles work perfectly in this app.

What is this hack used for?

@danielblazquez do you have a before/after screenshot you can share for context?

Very helpful thank you! I see what you mean. I tested it without and everything seems fine. I don't recall the original reason for this but it was several years ago. I think we're good to change this.

When you guys say to remove the table[class=body] attribute selector, do you mean to change things like table[class=body] h1 { to h1 { or do you mean to get rid of the "RESPONSIVE AND MOBILE FRIENDLY STYLES" styles all-together?

Only the table[class=body]

14 email clients do not support the [class=body] CSS3 attribute notation (among them iOS Gmail), as per CampaignMonitor's CSS reference for email.

Changing it to table.body, table.body h1 will do fine.