Skip to main content

CSS Conditional Comments – Special Blocks for Client-Specific Styles

Our platform supports special comment blocks that let you embed CSS targeting specific email clients.

Anni Wild avatar
Written by Anni Wild
Updated over 2 weeks ago

1. INLINER_IGNORE

Purpose:

Allows you to include CSS rules that are not processed by the inliner tool. This is especially useful for complex or highly specific CSS selectors that the inliner cannot correctly parse.

Syntax:

/* INLINER_IGNORE_START */
.your_classes {
/* REPLACE THIS COMMENT WITH YOUR STYLES */
}
/* INLINER_IGNORE_END */

Behavior:

All CSS rules within this block will not be inlined into HTML attributes but instead remain as a standard <style> tag.

Example:

/* INLINER_IGNORE_START */
div > u ~ div .your_classes {
/* This targets only Gmail */
}
/* INLINER_IGNORE_END */

❗ Without this wrapper, the above selector would be removed during inlining, as our parser can't match it to a supported email client.


2. OUTLOOK_CONDITIONAL

Purpose:

Inserts a separate style block that is only read by Outlook desktop clients (Outlook 2007–2019, Office 365, Windows Mail).

Syntax:

/* OUTLOOK_CONDITIONAL_START */
.your_classes {
/* REPLACE THIS COMMENT WITH YOUR STYLES */
}
/* OUTLOOK_CONDITIONAL_END */

Rendered Output:

<!--[if mso | ie]>
<style type="text/css">
.your_classes {
/* REPLACE THIS COMMENT WITH YOUR STYLES */
}
</style>
<![endif]-->

By wrapping this CSS block in a so-called conditional comment (<!--[if mso]>...<![endif]-->), we ensure that the contained styles are only interpreted by Outlook desktop clients — specifically Outlook 2007 through 2019, Office 365 for Windows, and Windows Mail. Other email clients will completely ignore this code because they don’t parse conditional comments.

✅ Just like INLINER_IGNORE, the styles in this block are not inlined and are rendered as a standalone style block.

Uses Microsoft Conditional Comments, which are interpreted only by MS Office rendering engines.


3. OUTLOOK_MOBILE_CONDITIONAL

Purpose:

Targets Outlook Mobile Clients (Android & iOS) by applying a special CSS hack suffix \0, which only these clients interpret.

Syntax:

/* OUTLOOK_MOBILE_CONDITIONAL_START */
.your_classes {
/* Your Outlook Mobile-specific styles here */
}
/* OUTLOOK_MOBILE_CONDITIONAL_END */

Rendered Output:

/* OUTLOOK_MOBILE_CONDITIONAL_START */
.your_classes\0 {
/* REPLACE THIS COMMENT WITH YOUR STYLES */
}
/* OUTLOOK_MOBILE_CONDITIONAL_END */

The styles in this block are rendered into a separate style block because Gmail ignores any style block containing invalid or "broken" CSS — such as the \0 suffix used here. By separating it out, we prevent valid styles from being stripped along with it.

✅ Like INLINER_IGNORE, the contained styles are not inlined, but output separately.


Summary Table

Block

Target Client

Inlining Behavior

Special Notes

INLINER_IGNORE

All

Not inlined

Supports complex selectors

OUTLOOK_CONDITIONAL

Outlook Desktop (Win/Mac)

Not inlined

Uses <!--[if mso]>; only read by Outlook

OUTLOOK_MOBILE_CONDITIONAL

Outlook Mobile (Android/iOS)

Not inlined

Uses \0 hack to bypass Gmail filtering

Did this answer your question?