Skip to content
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.

Print stylesheet #1633

Merged
merged 8 commits into from
Jul 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _includes/how-it-works/offshore_oil_gas_steps.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<section class="container-outer">

<div accordion="offshore-oilgas-dkk" accordion-item class="revenues_subpage-dyk">
<div accordion="offshore-oilgas-dyk" accordion-item class="revenues_subpage-dyk">

<h2 class="revenues_subpage-dyk_heading">Did you know?</h2>

Expand Down
3 changes: 2 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@

<!-- Styles
================================================== -->
<link rel="stylesheet" href="{{ site.baseurl }}/css/main.css">
<link rel="stylesheet" href="{{ site.baseurl }}/css/main.css" type="text/css" media="all">
<link rel="stylesheet" href="{{ site.baseurl }}/css/print.css" type="text/css" media="print">

<!-- Scripts
================================================== -->
Expand Down
10 changes: 10 additions & 0 deletions _sass/_print.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@media print {
@import 'print/layout';
@import 'print/home';
@import 'print/about';
@import 'print/landing';
@import 'print/how-it-works';
@import 'print/content';
@import 'print/state-page';
@import 'print/page-breaks';
}
23 changes: 23 additions & 0 deletions _sass/print/_about.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.bureau img,
.bureau-img {
width: 100px;
}

.article_img-60 {
max-width: 30;
width: 250px;


&.article_img-centered {
margin: 0;
}
}

.about_intro-highlight {
padding-left: 0;
text-align: left;
}

.about_intro-callout {
padding-left: 0;
}
14 changes: 14 additions & 0 deletions _sass/print/_content.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.layout-content {
.container-left-7 {
margin: 0;
width: 100%;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered margin, width
!important should not be used


.case_studies_intro-select {
display: none !important;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!important should not be used

}

.case_studies-maps {
text-align: left;
}
}
40 changes: 40 additions & 0 deletions _sass/print/_home.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.carousel,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Begin pseudo elements with double colons: ::

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what this flag is referencing.

.eiti-tabs,
.card-image_link,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!important should not be used

.eiti-tab-panel .explore_home-button,
.home-bottom-links {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!important should not be used

display: none !important;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!important should not be used

}

.card {
display: block;
float: none;
height: inherit !important;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!important should not be used


img {
display: none !important;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!important should not be used

}
}

.eiti-tab-panel {
display: block;
float: none;
margin-bottom: $base-padding-jumbo;

img {
margin: 0;
padding: 0;
}

&[aria-hidden=true] {
display: block !important;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!important should not be used

}
}

.header-image_link,
.card > a,
.explore_home-img {
&::after {
content: '';
}
}
10 changes: 10 additions & 0 deletions _sass/print/_how-it-works.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.revenues_page-footer,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line should be indented with spaces, not tabs

.revenues_subpage-involved_video,
.break {
display: none !important;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!important should not be used

}


.revenues_subpage-steps_group {
width: 100%;
}
35 changes: 35 additions & 0 deletions _sass/print/_landing.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.landing-section,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid qualifying attribute selectors with an element.
Begin pseudo elements with double colons: ::
Rule declaration should be preceded by an empty line

.landing-section_open {
margin-top: 0;

div[class^='landing-'] {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid qualifying attribute selectors with an element.

background: initial !important;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!important should not be used

height: initial !important;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!important should not be used

}
}

.landing-section a,
.landing-section_open a,
.hero-right a,
.landing-wrapper section a {
&::after {
content: '';
}
}

.hero-right_caption {
padding-left: 0;

a {
text-decoration: none;
}
}

.hero-right_square {
border: 0;
}

.hero-right_image {
text-align: left;
}

43 changes: 43 additions & 0 deletions _sass/print/_layout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
section.banner,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using id selectors
Avoid qualifying class selectors with an element.
Begin pseudo elements with double colons: ::
Opening curly brace { should be preceded by one space
Expected item on line 32 to appear before line 31. Rule sets should be ordered as follows: @extends, @includes without @content, properties, @includes with @content, nested rule sets
Avoid qualifying attribute selectors with an element.

.header-nav,
.header-bars,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!important should not be used
Colon after property should be followed by one space

footer,
#glossary,
#nav-drawer,
iframe,
.term .icon-book,
.carousel-button,
[accordion-button],
.hash_selector,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer single quoted strings

.sticky_nav {
display: none !important;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!important should not be used

}

header,
.container-outer {
margin-left: 0;
margin-right: 0;
}

@page {
margin: 0.5cm;
}

img {
max-width: 500px !important;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer single quoted strings

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!important should not be used

}

a::after{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opening curly brace { should be preceded by one space

@include font-size(1);
content: ' (' attr(href) ') ';
}

.term {
border-bottom: 0;
}


[accordion-content],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid qualifying attribute selectors with an element.

[accordion-item] div[aria-hidden='true'] {
display: block !important;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!important should not be used

}
17 changes: 17 additions & 0 deletions _sass/print/_page-breaks.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.chart-item,
.row-container,
tr,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered page-break-before, page-break-inside

figure,
figcaption,
eiti-data-map,
eiti-bar-chart,
img {
page-break-before: always;
page-break-inside: avoid;
}

h1:not(#title),
h2,
h3 {
page-break-after: avoid;
}
7 changes: 7 additions & 0 deletions _sass/print/_state-page.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.layout-state-pages figure {
min-height: 300px;
}

.chart-list {
width: 100%;
}
22 changes: 22 additions & 0 deletions css/print.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid CSS after "@import 'reset'": expected "{", was ";"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because of Jekyll syntax.

# Jekyll only builds Sass files with front matter
---

// include reset
@import 'reset';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid CSS after "@import 'reset'": expected "{", was ";"


// include Bourbon & Neat
@import 'lib/bourbon/bourbon';
@import 'lib/neat/neat';

// include site specific base styles
@import 'base';

// include fonts (and @import font-face declarations from /css/fonts)
@import 'fonts';

// include FontAwesome Sass variables, etc.
@import 'lib/font-awesome/font-awesome';

// include print stylesheet overrides
@import 'print';
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h4>Production from federal vs. non-federal lands and waters</h4>
</div>
</section>

<section class="explore_home-main" id="impact" role="tabpanel" aria-hidden="true">
<section class="eiti-tab-panel explore_home-main" id="impact" role="tabpanel" aria-hidden="true">
<div class="container-left-3">
<p>Extractive industries account for 2.6 percent of the national GDP, and contribute to exports and employment in many parts of the country.</p>
<a href="{{ site.baseurl }}/explore/#economic-impact" class="button-primary explore_home-button">Explore data</a>
Expand Down