1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
twbs--bootstrap/scss/_print.scss
Chris Rebert b9164b3690 Remove half-assed inclusion of link URLs (hrefs) when printing
* Relative URLs were output as-is, which is suboptimal or even confusing for end-users
* Ditto for fragment identifiers
* Outputting long URLs inline with prose isn't good UX

JavaScript could potentially help with this (e.g. http://alistapart.com/article/improvingprint).
However, we're not currently interested in trying to tackle the hard problem of fancy print stylesheets/views
(particularly given the level of cross-browser inconsistency when it comes to printing).
So let's just keep things simple, vanilla, and unsurprising,
which should also make it easy for others to add their own print fanciness on top of Bootstrap.
2015-04-11 00:24:27 -07:00

90 lines
1.4 KiB
SCSS

// Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css
// ==========================================================================
// Print styles.
// Inlined to avoid the additional HTTP request: h5bp.com/r
// ==========================================================================
@media print {
*,
*:before,
*:after {
color: #000 !important; // Black prints faster: h5bp.com/s
text-shadow: none !important;
background: transparent !important;
box-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
abbr[title]:after {
content: " (" attr(title) ")";
}
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;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
// Bootstrap specific changes start
// Bootstrap components
.navbar {
display: none;
}
.btn,
.dropup > .btn {
> .caret {
border-top-color: #000 !important;
}
}
.label {
border: 1px solid #000;
}
.table {
border-collapse: collapse !important;
td,
th {
background-color: #fff !important;
}
}
.table-bordered {
th,
td {
border: 1px solid #ddd !important;
}
}
// Bootstrap specific changes end
}