Home > database >  Email links change to blue (Apple Mail mac/ios)
Email links change to blue (Apple Mail mac/ios)

Time:02-21

I am designing a new email signature and every time I forward or reply to that email from within apple mail, it turns blue.

I can see it blue inside apple mail but also in f.i. in gmail. So it's not an issue of Apple Mail displaying the link blue but making it blue.

Here's an example code, inlined and formatted for better readability.

<p style="font-size: 15px; line-height: 18px;">
  <a 
    href="http://example.com" 
    x-apple-data-detectors="true" 
    style="font-size: 15px; 
    line-height: 18px; 
    color: #000000 !important; 
    text-decoration: underline !important; 
    text-decoration-color: #000000 !important; 
    pointer-events: visible;">
    www.example.com
</a>
</p>

What I tried so far:

  • Creating spans around and inside the a tag.
  • Setting x-apple-data-detectors to true and false
  • Setting <meta content="email=no" name="format-detection"> also for other link types
  • Setting link text to only text, like "click here" but they still get recognised and transformed.

I can't find much about the x-apple-data-detectors and wonder if there's a better way to debug them.

Help much appreciated.

CodePudding user response:

Is it possible it the code is picking up an active state on the link? Have you tried setting color on the active state?

CodePudding user response:

Try adding this to your <head>:

<style type="text/css">
.appleLinksBlack a {
  color: #000000!important; 
  text-decoration: underline!important;
  }
</style>

And then use that class on a parent of the <a>, e.g.:

<p style="font-size: 15px; line-height: 18px;">

  • Related