Skip to content

Print in light mode when in dark mode

What does this MR do and why?

Separate print stylesheet from application.css, as currently in dark mode it is changing some colors and making text unreadable

diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index ce8ccb2bc08e..00729b8f5bf9 100644
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -26,8 +26,3 @@
 
 // JH-only stylesheets
 @import 'application_jh';
-
-/* print styles */
-@media print {
-  @import 'print';
-}
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
index 5f038ac467d4..c16631e4fe84 100644
--- a/app/views/layouts/_head.html.haml
+++ b/app/views/layouts/_head.html.haml
@@ -40,6 +40,8 @@
 
   = stylesheet_link_tag 'performance_bar' if performance_bar_enabled?
 
+  = stylesheet_link_tag "print", media: "print"
+
   = render 'layouts/snowplow'
   = render 'layouts/loading_hints'

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #423279

Merge request reports