Issue found (and resolved) with CSS comments in Border tag in Outlook 365 on MacOS 12 and 13 | Community
Skip to main content
Jo_Pitts1
Community Manager
August 28, 2023

Issue found (and resolved) with CSS comments in Border tag in Outlook 365 on MacOS 12 and 13

  • August 28, 2023
  • 2 replies
  • 1636 views

Today (August 28, 2023) I noticed borders on my buttons stopped rendering in Office365 on MacOS 12 and MacOS 13.  They were working fine everywhere else.  It appears be related to Microsoft's last update to Office365 Outlook for MacOS on August 22, 2023. 

 

It's not a completely generalised issue however.  The use case is pretty specific.

 

This is a situation where I use a drop down to select colors.  Rather than visible color codes, I use my trick of putting a CSS comment in front of the attribute to give a human readable value to select (i.e as follows).

When selected, the actual value is  /* VE Blue */ #17468F

 

The unrendered CSS looks like this:

 

border:2px solid ${ctaBorderColor};

 

which then renders to:

 

border:2px solid /* VE Blue */ #17468F;

 

 

This works on all other platforms, and has just stopped working in Office 365 on MacOS 12 and MacOS 13.  Fortunately, the fix was simple.  Convert your code to do borders longhand as follows:

 

border-width:2px; border-style:solid; border-color:${ctaBorderColor};

 

which renders to:

 

border-width:2px; border-style:solid; border-color:/* VE Blue */ #17468F;

 

 

Am I happy about this?  Of course not.  However, I am at least happy I found the issue early and was able to resolve. 

 

I have tested this across Email On Acid, and also on as many devices/combinations as I can.  This seems to be a solid fix.

 

So, if you've ever used my trick to give human readable attributes in front of CSS values, you can expect it to break unless you've already used the longhand approach or unless you convert your code to use the longhand approach.

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Jo_Pitts1
Jo_Pitts1Author
Community Manager
August 29, 2023

@jasbirka , I've never had a client want a gradient in a CTA so not considered it.

 

New Participant
August 29, 2023

Hi @jo_pitts1,

 

This is really great, it can solve the issues with the other email clients.

 

Did you try the gradient in the CTAs?

 

Thanks!

Jasbir