Skip to content

Commit e3f02af

Browse files
author
Jeroen Ooms
committed
Merge branch 'release/v1.1.0'
2 parents ad277bc + 6fcdccf commit e3f02af

File tree

6 files changed

+169
-14
lines changed

6 files changed

+169
-14
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,8 @@ $initialize-block-margins: 0 0 0.75em;
5050
$initialize-heading-color: #000;
5151
$initialize-heading-font-family: sans-serif;
5252
$initialize-heading-margins: 1em 0 0.75em;
53+
```
54+
55+
```
56+
$initialize-print-styles: true;
5357
```

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "initialize-css",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"homepage": "http://jeroenoomsnl.github.io/initialize-css/",
55
"authors": [
66
"Jeroen Ooms (@jeroenooms)"

dist/_initialize.scss

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ $initialize-line-height: 1.4 !default;
1818
// Options
1919
//
2020
$initialize-dinosaur-mode: false !default; // toggle support for IE8, IE9 & IE10
21+
$initialize-print-styles: false !default; // toggle HTML5 Boilerplate print styles
2122

2223
//
2324
// Optional values
@@ -350,3 +351,75 @@ h1, h2, h3, h4, h5, h6 {
350351
p, table, ul, ol, fieldset, blockquote, dl {
351352
@include optional-prop('margin', $initialize-block-margins);
352353
}
354+
355+
//
356+
// Print styles
357+
//
358+
@if $initialize-print-styles == true {
359+
@media print {
360+
*,
361+
*:before,
362+
*:after,
363+
*:first-letter,
364+
*:first-line {
365+
background: transparent !important;
366+
color: #000 !important; // Black prints faster: http://www.sanbeiji.com/archives/953
367+
box-shadow: none !important;
368+
text-shadow: none !important;
369+
}
370+
371+
a,
372+
a:visited {
373+
text-decoration: underline;
374+
}
375+
376+
a[href]:after {
377+
content: " (" attr(href) ")";
378+
}
379+
380+
abbr[title]:after {
381+
content: " (" attr(title) ")";
382+
}
383+
384+
// Don't show links that are fragment identifiers,
385+
// or use the `javascript:` pseudo protocol
386+
a[href^="#"]:after,
387+
a[href^="javascript:"]:after {
388+
content: "";
389+
}
390+
391+
pre,
392+
blockquote {
393+
border: 1px solid #999;
394+
page-break-inside: avoid;
395+
}
396+
397+
// Printing Tables:
398+
// http://css-discuss.incutio.com/wiki/Printing_Tables
399+
thead {
400+
display: table-header-group;
401+
}
402+
403+
tr,
404+
img {
405+
page-break-inside: avoid;
406+
}
407+
408+
img {
409+
max-width: 100% !important;
410+
}
411+
412+
p,
413+
h2,
414+
h3 {
415+
orphans: 3;
416+
widows: 3;
417+
}
418+
419+
h2,
420+
h3 {
421+
page-break-after: avoid;
422+
}
423+
}
424+
}
425+

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "initialize-css",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"homepage": "http://jeroenoomsnl.github.io/initialize-css/",
55
"description": "Initialize.css is a complete and customizable collection of CSS best practices based on Normalize.css and HTML5 Boilerplate. Available in CSS and configurable SASS (SCSS) format.",
66
"author": {

src/index.html

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<link rel="stylesheet" href="styles/demo.css">
1414
</head>
1515
<body>
16-
<!--[if lte IE 10]>
16+
<!--[if lt IE 10]>
1717
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience and your life.</p>
1818
<![endif]-->
1919

@@ -36,27 +36,30 @@ <h2>Initialize.css is a complete and customizable collection of CSS best practic
3636

3737
<h2>Install</h2>
3838
<p>
39-
<strong>npm</strong><br>
40-
<code>npm install initialize-css</code>
39+
<strong>npm</strong>
4140
</p>
41+
<pre>npm install initialize-css</pre>
42+
4243
<p>
43-
<strong>bower</strong><br>
44-
<code>bower install initialize-css</code>
44+
<strong>bower</strong>
4545
</p>
46+
<pre>bower install initialize-css</pre>
4647

4748
<h2>Usage</h2>
4849
<p>
49-
<strong>sass / scss (from node_modules or bower_components)</strong><br>
50-
<code>@import: "module_folder_name/initialize-css/dist/initialize";</code>
50+
<strong>sass / scss (from node_modules or bower_components)</strong>
5151
</p>
52+
<pre>@import: "module_folder_name/initialize-css/dist/initialize";</pre>
53+
5254
<p>
53-
<strong>sass with browserify</strong><br>
54-
<code>@import: "initialize";</code>
55+
<strong>sass with browserify</strong>
5556
</p>
57+
<pre>@import: "initialize";</pre>
58+
5659
<p>
57-
<strong>or just copy the generated css files (with vendor prefixes)</strong><br>
58-
<code>&lt;link rel=&quot;stylesheet&quot; href=&quot;styles/initialize.min.css&quot;&gt;</code>
60+
<strong>or just copy the generated css files (with vendor prefixes)</strong>
5961
</p>
62+
<pre>&lt;link rel=&quot;stylesheet&quot; href=&quot;styles/initialize.min.css&quot;&gt;</pre>
6063

6164
<h2>Configure</h2>
6265
<p>Overwrite default values for generic typography:</p>
@@ -79,7 +82,9 @@ <h2>Configure</h2>
7982

8083
$initialize-heading-color: #000;
8184
$initialize-heading-font-family: sans-serif;
82-
$initialize-heading-margins: 1em 0 0.75em;
85+
$initialize-heading-margins: 1em 0 0.75em;
86+
87+
$initialize-print-styles: true;
8388
</pre>
8489

8590

src/styles/initialize.scss

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ $initialize-line-height: 1.4 !default;
1818
// Options
1919
//
2020
$initialize-dinosaur-mode: false !default; // toggle support for IE8, IE9 & IE10
21+
$initialize-print-styles: false !default; // toggle HTML5 Boilerplate print styles
2122

2223
//
2324
// Optional values
@@ -350,3 +351,75 @@ h1, h2, h3, h4, h5, h6 {
350351
p, table, ul, ol, fieldset, blockquote, dl {
351352
@include optional-prop('margin', $initialize-block-margins);
352353
}
354+
355+
//
356+
// Print styles
357+
//
358+
@if $initialize-print-styles == true {
359+
@media print {
360+
*,
361+
*:before,
362+
*:after,
363+
*:first-letter,
364+
*:first-line {
365+
background: transparent !important;
366+
color: #000 !important; // Black prints faster: http://www.sanbeiji.com/archives/953
367+
box-shadow: none !important;
368+
text-shadow: none !important;
369+
}
370+
371+
a,
372+
a:visited {
373+
text-decoration: underline;
374+
}
375+
376+
a[href]:after {
377+
content: " (" attr(href) ")";
378+
}
379+
380+
abbr[title]:after {
381+
content: " (" attr(title) ")";
382+
}
383+
384+
// Don't show links that are fragment identifiers,
385+
// or use the `javascript:` pseudo protocol
386+
a[href^="#"]:after,
387+
a[href^="javascript:"]:after {
388+
content: "";
389+
}
390+
391+
pre,
392+
blockquote {
393+
border: 1px solid #999;
394+
page-break-inside: avoid;
395+
}
396+
397+
// Printing Tables:
398+
// http://css-discuss.incutio.com/wiki/Printing_Tables
399+
thead {
400+
display: table-header-group;
401+
}
402+
403+
tr,
404+
img {
405+
page-break-inside: avoid;
406+
}
407+
408+
img {
409+
max-width: 100% !important;
410+
}
411+
412+
p,
413+
h2,
414+
h3 {
415+
orphans: 3;
416+
widows: 3;
417+
}
418+
419+
h2,
420+
h3 {
421+
page-break-after: avoid;
422+
}
423+
}
424+
}
425+

0 commit comments

Comments
 (0)