Pass media attribute explicitly to stylesheet link tags

So that we can enable Rails default behavior for potential future such link
tags without changing current behavior.
This commit is contained in:
David Rodríguez
2025-11-24 19:55:04 +01:00
parent 44c4a66970
commit e32dcd53b5
4 changed files with 4 additions and 4 deletions

View File

@@ -17,7 +17,7 @@
= render "layouts/matomo_tag"
= language_meta_tags
= stylesheet_pack_tag "darkswarm", "data-turbo-track": "reload"
= stylesheet_pack_tag "darkswarm", "data-turbo-track": "reload", media: "screen"
= javascript_pack_tag "application", "data-turbo-track": "reload"
= render "layouts/shopfront_script" if @shopfront_layout

View File

@@ -5,7 +5,7 @@
%meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
%title
= Spree::Config[:site_name]
= stylesheet_link_tag 'mail'
= stylesheet_link_tag 'mail', media: "screen"
%body{:bgcolor => "#FFFFFF" }
- unless @hide_ofn_navigation
%table.head-wrap

View File

@@ -14,7 +14,7 @@
= render "layouts/matomo_tag"
= language_meta_tags
= stylesheet_pack_tag "darkswarm"
= stylesheet_pack_tag "darkswarm", media: "screen"
= javascript_include_tag "darkswarm/all"
= javascript_pack_tag "application"

View File

@@ -14,7 +14,7 @@
# Rails.application.config.action_view.button_to_generates_button_tag = true
# `stylesheet_link_tag` view helper will not render the media attribute by default.
# Rails.application.config.action_view.apply_stylesheet_media_default = false
Rails.application.config.action_view.apply_stylesheet_media_default = false
# Change the digest class for the key generators to `OpenSSL::Digest::SHA256`.
# Changing this default means invalidate all encrypted messages generated by