Browse Source

Move print css styles into the main stylesheet

Saving a whole HTTP request
tags/v2.0.0
Adrian Short 6 years ago
parent
commit
ea27763fb5
3 changed files with 16 additions and 14 deletions
  1. +0
    -13
      public/print.css
  2. +16
    -0
      public/style.css
  3. +0
    -1
      views/layout.haml

+ 0
- 13
public/print.css View File

@@ -1,13 +0,0 @@
.noprint, #footer, .nav, nav
{
display: none;
}

body
{
margin: 0 auto;
}

a, a:visited {
background-color: #fff;
}

+ 16
- 0
public/style.css View File

@@ -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;
}
}

+ 0
- 1
views/layout.haml View File

@@ -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" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous">
%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


Loading…
Cancel
Save