Soho Interactive

Gmail Announces Support for Embedded Styles and Media Queries (Finally)

Gmail is about to make a major update to how their email client handles code. Read on to find out what changes will be made and how it might affect your emails.

Gmail will support embedded styles
That’s right! Gmail previously only supported embedded styles in its webmail version. Because they stripped all classes and IDs, though, this support didn’t do a whole lot for email devs. We’ll get into more detail as you read, but for now you can just bask in the joy of email developers worldwide.

Gmail will support classes and IDs
This is huge. This means that we can stop using inline styles for every single thing in email. You can use a class instead, and a single update to that class in the head will affect every instance of that style. Like real web development.

Gmail will support media queries
Combined with support for embedded styles and classes/IDs, this is fantastic news. This means that responsive emails (emails built with media queries that trigger at certain breakpoints) should now render properly in Gmail.

Gmail will support background-position and background-size
These properties can really add some flexibility to email designs. Unfortunately, Outlook.com only supports the table background attribute and not background CSS so the impact is muted. But it will be fun to experiment with responsive backgrounds in the Gmail app!