From e2c5bd4b7595f3d0c71627444c0f7cf5fc7de185 Mon Sep 17 00:00:00 2001 From: Steve Mokris <smokris@softpixel.com> Date: Sun, 3 Apr 2022 20:54:09 -0500 Subject: [PATCH] In emails, style implicit links too Fixes issue where, when some email clients (macOS/iOS Mail.app) automatically turn text into links, the links had different styling than other (explicit) links. Changelog: changed --- app/assets/stylesheets/notify_enhanced.scss | 4 ---- app/views/layouts/notify.html.haml | 4 ++++ app/views/layouts/service_desk.html.haml | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/notify_enhanced.scss b/app/assets/stylesheets/notify_enhanced.scss index a366498ea034..b331d997a97d 100644 --- a/app/assets/stylesheets/notify_enhanced.scss +++ b/app/assets/stylesheets/notify_enhanced.scss @@ -32,10 +32,6 @@ body { font-size: inherit; } -a { - text-decoration: none; -} - .gl-mb-5 { @include gl-mb-5; } diff --git a/app/views/layouts/notify.html.haml b/app/views/layouts/notify.html.haml index 3b979f69cac7..d9f16a89fbc2 100644 --- a/app/views/layouts/notify.html.haml +++ b/app/views/layouts/notify.html.haml @@ -5,6 +5,10 @@ GitLab - if Feature.enabled?(:enhanced_notify_css) = stylesheet_link_tag 'notify_enhanced' + %style{ type: 'text/css', 'data-premailer': 'ignore' } + -# The MUA automatically turns some text into links. + -# Match the color of explicit links ($blue-600 from typography.scss). + a { color: #1068bf; } - else = stylesheet_link_tag 'notify' = yield :head diff --git a/app/views/layouts/service_desk.html.haml b/app/views/layouts/service_desk.html.haml index a838ba91d261..bab7bc6b9da9 100644 --- a/app/views/layouts/service_desk.html.haml +++ b/app/views/layouts/service_desk.html.haml @@ -7,6 +7,10 @@ -# haml-lint:enable NoPlainNodes - if Feature.enabled?(:enhanced_notify_css) = stylesheet_link_tag 'notify_enhanced' + %style{ type: 'text/css', 'data-premailer': 'ignore' } + -# The MUA automatically turns some text into links. + -# Match the color of explicit links ($blue-600 from typography.scss). + a { color: #1068bf; } - else = stylesheet_link_tag 'notify' = yield :head -- GitLab