Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[31021] Use correct class match and media setting for highlight

Oliver Günther0e72b9ad574d
diff --git a/app/assets/stylesheets/layout/_print.sass b/app/assets/stylesheets/layout/_print.sass
index 3dbaadf33cc..a82a95a8a1b 100644
--- a/app/assets/stylesheets/layout/_print.sass
+++ b/app/assets/stylesheets/layout/_print.sass
@@ -51,7 +51,8 @@
// Show dot highlight in print
// even when bg not enabled
// not supported in all browsers
- [class^="__hl_"]
+ [class^="__hl_"],
+ [class*=" __hl_"]
color-adjust: exact
-webkit-print-color-adjust: exact
diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb
index bfca7673de6..6c89255689c 100644
--- a/app/views/layouts/base.html.erb
+++ b/app/views/layouts/base.html.erb
@@ -72,7 +72,9 @@ See docs/COPYRIGHT.rdoc for more details.
<%= include_frontend_assets %>
<%# Render CSS highlighting %>
- <%= stylesheet_link_tag "/highlighting/styles/#{highlight_css_version_tag}", skip_pipeline: true %>
+ <%= stylesheet_link_tag "/highlighting/styles/#{highlight_css_version_tag}",
+ media: :all,
+ skip_pipeline: true %>
<%= javascript_include_tag 'application' %>
<%= javascript_include_tag "locales/#{I18n.locale}" %>