_utilities.print.scss 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* ==========================================================================
  2. #PRINT
  3. ========================================================================== */
  4. /**
  5. * Very crude, reset-like styles taken from the HTML5 Boilerplate:
  6. * https://github.com/h5bp/html5-boilerplate/blob/5.3.0/dist/doc/css.md#print-styles
  7. * https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/main.css#L205-L282
  8. */
  9. @media print {
  10. /**
  11. * 1. Black prints faster: http://www.sanbeiji.com/archives/953
  12. */
  13. *,
  14. *:before,
  15. *:after {
  16. background: transparent !important;
  17. color: #000 !important; /* [1] */
  18. box-shadow: none !important;
  19. text-shadow: none !important;
  20. }
  21. a,
  22. a:visited {
  23. text-decoration: underline;
  24. }
  25. a[href]:after {
  26. content: " (" attr(href) ")";
  27. }
  28. abbr[title]:after {
  29. content: " (" attr(title) ")";
  30. }
  31. /**
  32. * Don’t show links that are fragment identifiers, or use the `javascript:`
  33. * pseudo protocol.
  34. */
  35. a[href^="#"]:after,
  36. a[href^="javascript:"]:after {
  37. content: "";
  38. }
  39. pre,
  40. blockquote {
  41. border: 1px solid #999;
  42. page-break-inside: avoid;
  43. }
  44. /**
  45. * Printing Tables: http://css-discuss.incutio.com/wiki/Printing_Tables
  46. */
  47. thead {
  48. display: table-header-group;
  49. }
  50. tr,
  51. img {
  52. page-break-inside: avoid;
  53. }
  54. img {
  55. max-width: 100% !important;
  56. }
  57. p,
  58. h2,
  59. h3 {
  60. orphans: 3;
  61. widows: 3;
  62. }
  63. h2,
  64. h3 {
  65. page-break-after: avoid;
  66. }
  67. }