`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?
Here you go
iOS 14.3 Gmail 6.0.2 with table[class=body]
:
https://user-images.githubusercontent.com/3729461/104575918-dde75180-5657-11eb-8025-f848ca19413c.jpg
Without:
https://user-images.githubusercontent.com/3729461/104575953-e63f8c80-5657-11eb-8400-886c70c59ab8.jpg
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.