From ea27763fb55b3c0da9b024e2e36190fb63e775a4 Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Tue, 21 Aug 2018 15:59:44 +0100 Subject: [PATCH] Move print css styles into the main stylesheet Saving a whole HTTP request --- public/print.css | 13 ------------- public/style.css | 16 ++++++++++++++++ views/layout.haml | 1 - 3 files changed, 16 insertions(+), 14 deletions(-) delete mode 100644 public/print.css diff --git a/public/print.css b/public/print.css deleted file mode 100644 index e3108cd..0000000 --- a/public/print.css +++ /dev/null @@ -1,13 +0,0 @@ -.noprint, #footer, .nav, nav -{ - display: none; -} - -body -{ - margin: 0 auto; -} - -a, a:visited { - background-color: #fff; -} \ No newline at end of file diff --git a/public/style.css b/public/style.css index 7538e3b..6c5f2d4 100644 --- a/public/style.css +++ b/public/style.css @@ -293,3 +293,19 @@ nav border: 1px solid green; padding: 20px 20px; } + +@media print { + .noprint, #footer, .nav, nav + { + display: none; + } + + body + { + margin: 0 auto; + } + + a, a:visited { + background-color: #fff; + } +} \ No newline at end of file diff --git a/views/layout.haml b/views/layout.haml index ee2f200..5c75953 100644 --- a/views/layout.haml +++ b/views/layout.haml @@ -4,7 +4,6 @@ %title= @page_title ? @page_title + " - Sutton Elections" : "Sutton Elections - Your guide to voting and election results in the London Borough of Sutton" %link{ :rel => 'stylesheet', :type => 'text/css', :href => '/style.css' } - %link{ :rel => 'stylesheet', :type => 'text/css', :href => '/print.css', :media => 'print' } %meta{ :name => 'referrer', :content => 'no-referrer' } %meta{ :name => 'viewport', :content => 'width=device-width, initial-scale=1' } %body