diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index eaf0c0b98..1fc589860 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -5,4 +5,3 @@ // = require ./fonts // = require leaflet // = require_tree . -// = stub ./print.scss diff --git a/app/assets/stylesheets/print.scss b/app/assets/stylesheets/print.scss index cbb30fc56..4c0e9749c 100644 --- a/app/assets/stylesheets/print.scss +++ b/app/assets/stylesheets/print.scss @@ -1,63 +1,65 @@ @import "colors"; @import "fonts"; -.new-header, -.sub-header, -footer { - display: none; -} - -.print-header { - display: block; - margin-top: 30px; - font-size: 30px; - line-height: 50px; - font-weight: bold; -} - -body { - font-family: "Muli"; -} - -.subtitle { - margin-top: -20px; - color: $dark-grey; -} - -th, -td { - vertical-align: top; -} - -th { - text-align: left; - - &.header-section { - padding-top: 1.2em; - font-size: 1.2em; +@media print { + .new-header, + .sub-header, + footer { + display: none; } -} -.messagerie { - .messages-list { - list-style: none; - padding-left: 0; - max-height: none; + .print-header { + display: block; + margin-top: 30px; + font-size: 30px; + line-height: 50px; + font-weight: bold; + } - h2 { - font-size: 110%; - } + body { + font-family: "Muli"; + } - .person-icon { - display: none; + .subtitle { + margin-top: -20px; + color: $dark-grey; + } + + th, + td { + vertical-align: top; + } + + th { + text-align: left; + + &.header-section { + padding-top: 1.2em; + font-size: 1.2em; } } -} -.message { - margin-bottom: 40px; -} + .messagerie { + .messages-list { + list-style: none; + padding-left: 0; + max-height: none; -.updated-at { - display: none; + h2 { + font-size: 110%; + } + + .person-icon { + display: none; + } + } + } + + .message { + margin-bottom: 40px; + } + + .updated-at { + display: none; + } } diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index d2ed48a5c..28285f2ea 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -20,7 +20,6 @@ = preload_link_tag(asset_url("Muli-Bold.woff2")) = stylesheet_link_tag 'application', media: 'all' - = stylesheet_link_tag 'print', media: 'print' = Gon::Base.render_data(camel_case: true, init: true, nonce: request.content_security_policy_nonce) diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index c97536ee3..86d374be3 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -10,5 +10,6 @@ Rails.application.config.assets.paths << Rails.root.join('node_modules', '@reach Rails.application.config.assets.paths << Rails.root.join('node_modules', '@mapbox', 'mapbox-gl-draw', 'dist') # Precompile additional assets. -# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. -Rails.application.config.assets.precompile += ['print.css'] +# application.js, application.css, and all non-JS/CSS in the app/assets +# folder are already added. +# Rails.application.config.assets.precompile += %w( admin.js admin.css )