]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fixes #6897: Print styles get own .less file
authorMark Otto <otto@github.com>
Fri, 1 Mar 2013 03:42:51 +0000 (19:42 -0800)
committerMark Otto <otto@github.com>
Fri, 1 Mar 2013 03:42:51 +0000 (19:42 -0800)
docs/assets/css/bootstrap.css
docs/customize.html
less/bootstrap.less
less/print.less [new file with mode: 0644]
less/scaffolding.less

index e20f1a6647c395f3a3153a0ea40eb2a96ffb94a2..159cc53270684cc7059486248701ee4302de76f2 100644 (file)
@@ -1,7 +1,7 @@
 /*!
  * Bootstrap v3.0.0
  *
- * Copyright 2012 Twitter, Inc
+ * Copyright 2013 Twitter, Inc
  * Licensed under the Apache License v2.0
  * http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -218,6 +218,58 @@ table {
   border-spacing: 0;
 }
 
+@media print {
+  * {
+    color: #000 !important;
+    text-shadow: none !important;
+    background: transparent !important;
+    box-shadow: none !important;
+  }
+  a,
+  a:visited {
+    text-decoration: underline;
+  }
+  a[href]:after {
+    content: " (" attr(href) ")";
+  }
+  abbr[title]:after {
+    content: " (" attr(title) ")";
+  }
+  .ir a:after,
+  a[href^="javascript:"]:after,
+  a[href^="#"]:after {
+    content: "";
+  }
+  pre,
+  blockquote {
+    border: 1px solid #999;
+    page-break-inside: avoid;
+  }
+  thead {
+    display: table-header-group;
+  }
+  tr,
+  img {
+    page-break-inside: avoid;
+  }
+  img {
+    max-width: 100% !important;
+  }
+  @page  {
+    margin: 0.5cm;
+  }
+  p,
+  h2,
+  h3 {
+    orphans: 3;
+    widows: 3;
+  }
+  h2,
+  h3 {
+    page-break-after: avoid;
+  }
+}
+
 html {
   font-size: 62.5%;
   -webkit-overflow-scrolling: touch;
@@ -283,58 +335,6 @@ img {
   border-radius: 500px;
 }
 
-@media print {
-  * {
-    color: #000 !important;
-    text-shadow: none !important;
-    background: transparent !important;
-    box-shadow: none !important;
-  }
-  a,
-  a:visited {
-    text-decoration: underline;
-  }
-  a[href]:after {
-    content: " (" attr(href) ")";
-  }
-  abbr[title]:after {
-    content: " (" attr(title) ")";
-  }
-  .ir a:after,
-  a[href^="javascript:"]:after,
-  a[href^="#"]:after {
-    content: "";
-  }
-  pre,
-  blockquote {
-    border: 1px solid #999;
-    page-break-inside: avoid;
-  }
-  thead {
-    display: table-header-group;
-  }
-  tr,
-  img {
-    page-break-inside: avoid;
-  }
-  img {
-    max-width: 100% !important;
-  }
-  @page  {
-    margin: 0.5cm;
-  }
-  p,
-  h2,
-  h3 {
-    orphans: 3;
-    widows: 3;
-  }
-  h2,
-  h3 {
-    page-break-after: avoid;
-  }
-}
-
 p {
   margin: 0 0 10px;
 }
index 9a503ff8f40651997493999ead63bd6532263033..014a48f5e4c8161dca2732e89ba9a8ed6872231e 100644 (file)
@@ -44,6 +44,7 @@ title: Customize and download
               <div class="span3">
                 <h3>Scaffolding</h3>
                 <label class="checkbox"><input checked="checked" type="checkbox" value="reset.less"> Normalize and reset</label>
+                <label class="checkbox"><input checked="checked" type="checkbox" value="print.less"> Print</label>
                 <label class="checkbox"><input checked="checked" type="checkbox" value="scaffolding.less"> Body type and links</label>
                 <label class="checkbox"><input checked="checked" type="checkbox" value="grid.less"> Grid system</label>
                 <label class="checkbox"><input checked="checked" type="checkbox" value="layouts.less"> Layouts</label>
index 60d166368c384ad1f5c16191dad04773503fdfd6..461f9eceac15868dd1420c4014f77ef03935b359 100644 (file)
@@ -1,7 +1,7 @@
 /*!
  * Bootstrap v3.0.0
  *
- * Copyright 2012 Twitter, Inc
+ * Copyright 2013 Twitter, Inc
  * Licensed under the Apache License v2.0
  * http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -9,11 +9,12 @@
  */
 
 // Core variables and mixins
-@import "variables.less"; // Modify this for custom colors, font-sizes, etc
+@import "variables.less";
 @import "mixins.less";
 
 // Reset
 @import "normalize.less";
+@import "print.less";
 
 // Core CSS
 @import "scaffolding.less";
diff --git a/less/print.less b/less/print.less
new file mode 100644 (file)
index 0000000..c7e78e2
--- /dev/null
@@ -0,0 +1,69 @@
+//
+// Basic print styles
+// --------------------------------------------------
+// Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css
+
+@media print {
+
+  * {
+    text-shadow: none !important;
+    color: #000 !important; // Black prints faster: h5bp.com/s
+    background: transparent !important;
+    box-shadow: none !important;
+  }
+
+  a,
+  a:visited {
+    text-decoration: underline;
+  }
+
+  a[href]:after {
+    content: " (" attr(href) ")";
+  }
+
+  abbr[title]:after {
+    content: " (" attr(title) ")";
+  }
+
+  // Don't show links for images, or javascript/internal links
+  .ir a:after,
+  a[href^="javascript:"]:after,
+  a[href^="#"]:after {
+    content: "";
+  }
+
+  pre,
+  blockquote {
+    border: 1px solid #999;
+    page-break-inside: avoid;
+  }
+
+  thead {
+    display: table-header-group; // h5bp.com/t
+  }
+
+  tr,
+  img {
+    page-break-inside: avoid;
+  }
+
+  img {
+    max-width: 100% !important;
+  }
+
+  @page {
+    margin: 0.5cm;
+  }
+
+  p,
+  h2,
+  h3 {
+    orphans: 3;
+    widows: 3;
+  }
+
+  h2,
+  h3 {
+    page-break-after: avoid;
+  }
+}
index d885c765edbf6df473f05e8aee2632d3ab3d5c57..eee9cc93c6a03a3d204ccde1ed50e86a1b9f6b11 100644 (file)
@@ -85,73 +85,3 @@ img {
 .img-circle {
   border-radius: 500px; // crank the border-radius so it works with most reasonably sized images
 }
-
-
-// Printing
-// -------------------------
-// Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css
-
-@media print {
-
-  * {
-    text-shadow: none !important;
-    color: #000 !important; // Black prints faster: h5bp.com/s
-    background: transparent !important;
-    box-shadow: none !important;
-  }
-
-  a,
-  a:visited {
-    text-decoration: underline;
-  }
-
-  a[href]:after {
-    content: " (" attr(href) ")";
-  }
-
-  abbr[title]:after {
-    content: " (" attr(title) ")";
-  }
-
-  // Don't show links for images, or javascript/internal links
-  .ir a:after,
-  a[href^="javascript:"]:after,
-  a[href^="#"]:after {
-    content: "";
-  }
-
-  pre,
-  blockquote {
-    border: 1px solid #999;
-    page-break-inside: avoid;
-  }
-
-  thead {
-    display: table-header-group; // h5bp.com/t
-  }
-
-  tr,
-  img {
-    page-break-inside: avoid;
-  }
-
-  img {
-    max-width: 100% !important;
-  }
-
-  @page {
-    margin: 0.5cm;
-  }
-
-  p,
-  h2,
-  h3 {
-    orphans: 3;
-    widows: 3;
-  }
-
-  h2,
-  h3 {
-    page-break-after: avoid;
-  }
-}