_print.scss 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. // stylelint-disable declaration-no-important, selector-no-qualifying-type
  2. // Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css
  3. // ==========================================================================
  4. // Print styles.
  5. // Inlined to avoid the additional HTTP request:
  6. // http://www.phpied.com/delay-loading-your-print-css/
  7. // ==========================================================================
  8. @if $enable-print-styles {
  9. @media print {
  10. *,
  11. *::before,
  12. *::after {
  13. // Bootstrap specific; comment out `color` and `background`
  14. //color: #000 !important; // Black prints faster: http://www.sanbeiji.com/archives/953
  15. text-shadow: none !important;
  16. //background: transparent !important;
  17. box-shadow: none !important;
  18. }
  19. a,
  20. a:visited {
  21. text-decoration: underline;
  22. }
  23. // Bootstrap specific; comment the following selector out
  24. //a[href]::after {
  25. // content: " (" attr(href) ")";
  26. //}
  27. abbr[title]::after {
  28. content: " (" attr(title) ")";
  29. }
  30. // Bootstrap specific; comment the following selector out
  31. //
  32. // Don't show links that are fragment identifiers,
  33. // or use the `javascript:` pseudo protocol
  34. //
  35. //a[href^="#"]::after,
  36. //a[href^="javascript:"]::after {
  37. // content: "";
  38. //}
  39. pre {
  40. white-space: pre-wrap !important;
  41. }
  42. pre,
  43. blockquote {
  44. border: $border-width solid #999; // Bootstrap custom code; using `$border-width` instead of 1px
  45. page-break-inside: avoid;
  46. }
  47. //
  48. // Printing Tables:
  49. // http://css-discuss.incutio.com/wiki/Printing_Tables
  50. //
  51. thead {
  52. display: table-header-group;
  53. }
  54. tr,
  55. img {
  56. page-break-inside: avoid;
  57. }
  58. p,
  59. h2,
  60. h3 {
  61. orphans: 3;
  62. widows: 3;
  63. }
  64. h2,
  65. h3 {
  66. page-break-after: avoid;
  67. }
  68. // Bootstrap specific changes start
  69. // Bootstrap components
  70. .navbar {
  71. display: none;
  72. }
  73. .badge {
  74. border: $border-width solid #000;
  75. }
  76. .table {
  77. border-collapse: collapse !important;
  78. td,
  79. th {
  80. background-color: #fff !important;
  81. }
  82. }
  83. .table-bordered {
  84. th,
  85. td {
  86. border: 1px solid #ddd !important;
  87. }
  88. }
  89. // Bootstrap specific changes end
  90. }
  91. }