Outlook VML Buttons and Dark Mode Rendering
A technical reference for how classic Outlook for Windows handles VML buttons, MSO fallbacks and dark mode colour transformations.
Classic Outlook Windows
Word-engine rendering makes VML useful for buttons, backgrounds and rounded fills, but dark mode is high risk.
New Outlook Windows
WebView-style rendering should not be treated as the same target as classic Outlook for Windows.
Outlook.com + mobile
Not VML clients, but dark mode can still create border, background and text mismatches.
Bulletproof buttons
The common production pattern is VML inside MSO conditionals plus an HTML/CSS anchor for everyone else.
This is an independent MailMode guide, not official Microsoft documentation. Outlook behaviour changes across rendering engines, app versions, tenants and user settings, so treat these patterns as practical checks rather than exact guarantees.
VML is a scoped Outlook Windows fallback
- VML is deprecated as a web technology, but still matters in email because classic Outlook for Windows uses Word-style rendering.
- VML should be treated as a Word/MSO fallback technique, not a general-purpose email design layer.
- VML is only relevant for classic Outlook for Windows and Microsoft 365 classic Outlook for Windows.
- New Outlook for Windows, Outlook.com, Outlook for Mac and Outlook mobile should not be treated as VML clients.
- Most bulletproof buttons use a hybrid structure: VML inside MSO conditionals plus an HTML/CSS
<a>button for everyone else. - Classic Outlook dark mode can preserve VML fills or VML images while transforming live text, HTML backgrounds or CSS borders.
- That split can cause two-tone button patches, fill/text mismatches and border/fill mismatches.
fillcolor,strokecolor, inline CSS,bgcolorand live text can be processed differently.mso-color-alt:autois a specialised text workaround with body/fill colour constraints, not a universal fix.- Nested VML is fragile; a VML button inside a VML background image is a common classic Outlook failure path.
- VML remains useful, but only as a scoped legacy fallback.
- Accessibility matters: keep CTA text live and avoid image-only buttons.
- Test classic Outlook Windows, new Outlook, Outlook.com, Mac and mobile separately.
Where VML actually matters
VML behaviour notes are based on public Microsoft documentation, bulletproof email development references and email developer testing sources. Behaviour can vary by Outlook version, Windows settings, rendering path and account configuration.
data-og*, transparent border strategies and resilient HTML buttons instead of VML.What VML is doing inside a button
A bulletproof Outlook button usually has two paths. MSO conditional comments expose the VML branch to classic Outlook for Windows, while the normal HTML anchor handles webmail, mobile, Apple Mail, Gmail and new Outlook-style clients.
<v:roundrect> creates the Outlook-only rounded rectangle. arcsize controls the radius, fillcolor controls the fill, strokecolor controls the stroke, and <v:fill> handles advanced fills or images.
<v:textbox> can hold richer boxed content, but it adds complexity. <w:anchorlock> helps lock the clickable area in Word/Outlook.
The VML and HTML layers need matching dimensions, text, colours and links. Fixed VML dimensions are common because classic Outlook does not behave like modern CSS padding. If one layer changes in dark mode and the other does not, the mismatch becomes visible.
<div>
<!--[if mso]>
<v:roundrect
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:w="urn:schemas-microsoft-com:office:word"
href="https://example.com"
style="height:44px;v-text-anchor:middle;width:220px;"
arcsize="12%"
strokecolor="#4f46e5"
fillcolor="#4f46e5">
<w:anchorlock/>
<center style="color:#ffffff;font-family:Arial,sans-serif;font-size:16px;font-weight:bold;">
Call to action
</center>
</v:roundrect>
<![endif]-->
<a href="https://example.com"
style="background-color:#4f46e5;border:1px solid #4f46e5;border-radius:6px;color:#ffffff;display:inline-block;font-family:Arial,sans-serif;font-size:16px;font-weight:bold;line-height:44px;text-align:center;text-decoration:none;width:220px;mso-hide:all;">
Call to action
</a>
</div>Why Outlook buttons can split into layers
Classic Outlook Windows behaviour should be treated as observed risk, not a fixed algorithm. VML fills, strokes, live text and HTML fallbacks can be handled differently across Outlook builds and Windows display settings.
Single visual button
The VML branch and HTML branch are visually aligned, so the recipient sees one consistent CTA.
Classic Outlook transformation
Classic Outlook is best treated as full-invert risk at layout level, with VML-specific exceptions.
Fill preserved, text changed
The VML shape colour may remain fixed while text, stroke or surrounding surfaces shift for contrast.
Two-tone centre patch
An HTML layer above or inside the VML button can become visible if it transforms differently.
mso-color-alt:auto
Can help VML text in narrow cases, but depends on body and fill colour relationships.
Outlook.com/mobile border mismatch
Non-VML Outlook clients can still transform fill and border colours independently.
VML and HTML properties do not behave as one system
Property notes describe practical email QA risks rather than guaranteed Outlook rules. Test the rendered email because MSO conditionals, VML attributes and HTML fallback styles can diverge.
fillcolorVML shape fillMedium controlOften behaves differently from HTML backgrounds; do not assume future Outlook builds preserve it identically.<v:fill color="">Advanced VML fillLow controlCan handle images, tiles or fills; image fills add remote-content and dark-mode risk.strokecolorVML border/strokeLow controlStroke and fill can diverge; do not rely on a subtle one-pixel outline.strokeweightVML stroke widthMedium controlChanging stroke weight can require matching width/height changes to keep the visual box aligned.background-colorHTML fallback anchor/tablePartial invertMay be transformed separately from VML fill.bgcolorHTML table/cell attributePartial invertUseful fallback, but can be treated differently from CSS.colorHTML textFull invert riskLive text is accessible, but colour can be rewritten by clients.<center style="color:...">Text inside VMLLow controlText inside VML is harder to stabilise than simple HTML text.mso-color-alt:autoMSO-specific text workaroundUse with cautionSpecialised workaround; body background and VML fill values influence the result.mso-hide:allHide HTML branch from OutlookMedium controlHelps avoid duplicate buttons, but still needs real Outlook testing.arcsizeVML corner radiusMedium controlMust visually match HTML border-radius; exact mapping is not always obvious.width / heightVML and HTML dimensionsMixed supportCommon in bulletproof buttons, but fragile at high DPI or with long/localised text.v-text-anchorVML vertical alignmentMedium controlUseful for centring, but does not solve colour transformation.hrefVML click targetTracking riskMust match the HTML anchor URL so tracking and accessibility do not diverge.Common Outlook VML button failures
VML fill may stay fixed while text changes
- What breaks
- Text loses contrast against a preserved VML fill.
- Affected Outlook surface
- Classic Outlook Windows.
- Why it happens
- VML fill and live text can be processed differently.
- Safer approach
- Test text colour in dark mode and keep fallback contrast high.
Button background and VML fill can diverge
- What breaks
- The HTML fallback and VML branch no longer match.
- Affected Outlook surface
- Classic Outlook Windows.
- Why it happens
- CSS background and VML fill are separate layers.
- Safer approach
- Keep Outlook-only HTML backgrounds transparent where needed.
Two-tone centre patch behind text
- What breaks
- A rectangle appears behind the button label.
- Affected Outlook surface
- Classic Outlook Windows.
- Why it happens
- An inner HTML layer transforms over a fixed VML fill.
- Safer approach
- Remove competing inner backgrounds in the MSO branch.
Border/fill mismatch
- What breaks
- The stroke remains bright or dark while the fill changes.
- Affected Outlook surface
- Outlook Windows, Outlook.com and mobile.
- Why it happens
- Stroke, border and fill colours are evaluated separately.
- Safer approach
- Use robust contrast and consider transparent borders in web/mobile clients.
Rounded corners differ
- What breaks
- The VML radius and HTML radius do not visually align.
- Affected Outlook surface
- Classic Outlook Windows.
- Why it happens
arcsizedoes not map perfectly to CSSborder-radius.- Safer approach
- Use modest radii and compare against the HTML fallback.
VML button over VML background image
- What breaks
- Stacked VML layers become fragile or misaligned.
- Affected Outlook surface
- Classic Outlook Windows.
- Why it happens
- Nested or overlapping VML increases rendering complexity.
- Safer approach
- Keep VML as flat and scoped as possible.
Image-backed button disappears
- What breaks
- The CTA meaning vanishes when images are blocked.
- Affected Outlook surface
- Outlook clients with remote images blocked.
- Why it happens
- Image-only buttons depend on image loading.
- Safer approach
- Use live text with a real link and accessible label.
VML image fill does not load
- What breaks
- A background-image button or hero CTA loses its intended surface.
- Affected Outlook surface
- Classic Outlook Windows with blocked remote content.
- Why it happens
- VML image fills depend on remote image loading permissions.
- Safer approach
- Prefer solid fills and keep CTA meaning in live text.
Dark button disappears into dark canvas
- What breaks
- The button edge vanishes when the surrounding surface also darkens.
- Affected Outlook surface
- Classic Outlook Windows, Outlook.com and mobile.
- Why it happens
- Fill, border and page background can transform independently.
- Safer approach
- Add a tested outline, wrapper or contrast edge that survives the target client.
120 DPI scaling distorts dimensions
- What breaks
- Text, height or width no longer align cleanly.
- Affected Outlook surface
- Windows Outlook on scaled displays.
- Why it happens
- Word rendering and Windows DPI scaling can alter dimensions.
- Safer approach
- Test 100% and 120 DPI where possible.
Tracking links diverge
- What breaks
- The VML
hrefand HTML anchor lead to different URLs. - Affected Outlook surface
- Classic Outlook Windows and non-Outlook fallbacks.
- Why it happens
- The button has two link declarations.
- Safer approach
- Keep VML and HTML hrefs generated from the same source.
Keep VML narrow and intentional
Use a normal HTML anchor first
The HTML button should be the main production pattern for non-MSO clients.
Scope VML to classic Windows
Wrap VML inside MSO conditionals so it does not leak into modern clients.
Match dimensions
Keep VML width, height, line-height and text aligned with the HTML fallback.
Avoid nested VML
VML backgrounds, buttons and images layered together are harder to debug.
Use transparent or RGBA HTML layers
When a VML fill is present, reduce competing Outlook-only HTML backgrounds that can invert separately.
Use live text
Do not make the CTA depend on a button image that may be blocked.
Prefer resilient borders
Transparent or higher-contrast borders can reduce Outlook.com/mobile mismatch risk.
Check DPI scaling
Test classic Outlook at normal and scaled Windows display settings when possible.
Treat mso-color-alt:auto as narrow
Use it only after testing body/fill combinations; it usually cannot optimise every text case globally.
Share one URL source
Generate VML and HTML hrefs together so tracking and analytics stay consistent.
Small button patterns worth testing
These snippets are examples, not drop-in guarantees. Test the final compiled HTML in the Outlook clients that matter to your audience.
These are simplified MailMode-authored patterns using placeholder URLs. Keep the VML href and HTML anchor href generated from the same source in production.
<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:w="urn:schemas-microsoft-com:office:word"
href="https://example.com"
arcsize="12%"
fillcolor="#4f46e5"
strokecolor="#4f46e5"
style="height:44px;v-text-anchor:middle;width:220px;">
<w:anchorlock/>
<center style="color:#ffffff;font-family:Arial,sans-serif;font-size:16px;font-weight:bold;">Call to action</center>
</v:roundrect>
<![endif]-->
<a href="https://example.com"
style="background-color:#4f46e5;border:1px solid #4f46e5;border-radius:6px;color:#ffffff;display:inline-block;line-height:44px;text-align:center;text-decoration:none;width:220px;mso-hide:all;">
Call to action
</a><!--[if mso]>
<style>
.mso-transparent-bg {
background: transparent !important;
}
</style>
<![endif]--><a href="https://example.com"
style="background:rgba(79,70,229,1);border:1px solid #4f46e5;color:#ffffff;display:inline-block;line-height:44px;text-align:center;text-decoration:none;width:220px;">
Call to action
</a><a href="https://example.com"
style="background-color:#4f46e5;border:1px solid transparent;border-radius:6px;color:#ffffff;display:inline-block;line-height:44px;text-align:center;text-decoration:none;width:220px;">
Call to action
</a><!--[if mso]>
<style>
.mso-auto-text {
mso-color-alt: auto;
}
</style>
<![endif]--><!--[if mso]>
<table role="presentation" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#4f46e5">
<![endif]-->
<a href="https://example.com" class="button">
Call to action
</a>
<!--[if mso]>
</td>
</tr>
</table>
<![endif]-->Bulletproof should still mean usable
- Bulletproof buttons are usually better than image-only CTAs because they preserve live text.
- Screen readers and keyboard users need meaningful links, not decorative button images.
- VML can introduce accessibility complications, so keep the real CTA as a meaningful
<a>where possible. - Keep the VML
hrefand HTML anchorhrefaligned so the same CTA destination is exposed in every branch. - Links inside VML-heavy background sections can be harder to keyboard-test in classic Outlook, so verify focus and click behaviour where possible.
- Avoid duplicate or competing links if the VML
hrefand HTML anchor diverge. - Use clear link text that still makes sense when the surrounding design changes.
Is VML still worth using?
Classic Outlook is important
Use VML if your audience includes classic Outlook for Windows and the design needs something Word Outlook cannot otherwise render reliably.
Mostly web/mobile/new Outlook
If the audience is mainly modern Outlook surfaces, a simpler HTML button can be more resilient.
Use VML as a fallback
VML should support a legacy client path, not become the whole design system.
Prioritise resilience
When brand-perfect corners matter less than readability, simpler buttons often survive dark mode better.
How this maps back to MailMode
Full-invert preview is useful for classic Outlook Windows-style risk, where aggressive transformations can expose CTA contrast and layer problems.
Partial-invert preview is useful for Outlook.com and mobile-style border, fill and background mismatch checks.
No-change preview remains useful because Outlook users can switch message viewing back toward original formatting or a light reading pane.
VML-specific behaviour is difficult to simulate exactly because VML fills, VML images, live text and HTML layers may transform differently. Treat MailMode previews as practical approximations, not exact Outlook/VML emulators.
What VML guidance cannot guarantee
Outlook is not one renderer
Classic Windows, new Outlook, Outlook.com, Mac and mobile clients need separate QA paths.
Fill behaviour is observed, not future-proof
VML fills often behave differently from HTML colours today, but future Outlook versions can change.
VML text remains difficult
mso-color-alt:auto can help narrow cases, but body colour, fill colour and build differences still matter.
Image-backed buttons are fragile
VML image fills and image-only CTAs can fail when images are blocked or content is not trusted.
Providers can disagree
VML dark-mode results can vary between test providers, local machines and Outlook 365 builds.
Sources & Further Reading
Last Updated: Sources Reviewed: