MailViewr - Free HTML Email Preview Tool
← CSS Support Index

Does CSS Chaining selectors Work in HTML Email?

Chaining selectors (`.foo.bar`) allows to apply styles to elements matching all the corresponding selectors.

Quick Answer

Does Chaining selectors work in HTML email?

The CSS Chaining selectors property is supported in Gmail, Outlook (Mac / Web), Apple Mail, Yahoo! Mail, and others. It is NOT supported in Outlook (Windows). Always include a safe fallback for unsupported clients.

Which Email Clients Support CSS Chaining selectors?

CSS support for Chaining selectors across email clients

Email ClientDesktopMobile / WebNotes
Gmail✓ Yes~ Partial
Outlook (Windows)✗ No?
Outlook (Mac / Web)✓ Yes✓ Yes
Apple Mail✓ Yes✓ Yes
Yahoo! Mail✓ Yes✓ Yes
Samsung Email?✓ Yes
Thunderbird✓ Yes?
ProtonMail✗ No✓ Yes
Fastmail✓ Yes?

Notes

  • #1 Partial. Not supported with non Google accounts.
  • #2 Buggy. The first `<head>` in the HTML is removed, so `<style>` elements need to be in a second `<head>` element.
  • #3 Buggy. Styles will be applied to the first selector of the chain.
  • #4 Buggy. Only the first selector of the chain is prefixed in the styles, but all classes are prefixed in the HTML.
  • #5 Partial. Only when used as class or ID selectors

Frequently Asked Questions

Related CSS Properties

Test Your Email Now

Paste your HTML and see how it renders in clients that don't support
Chaining selectors.

Open Email Previewer