print.less 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /**
  2. * Copyright © Magento, Inc. All rights reserved.
  3. * See COPYING.txt for license details.
  4. */
  5. @import 'source/lib/_lib.less'; // Global lib
  6. @import 'source/_theme.less'; // Theme overrides
  7. @import 'source/_variables.less'; // Local theme variables
  8. @baseDir: '../'; // Default
  9. // Magento/blank
  10. .page-print {
  11. .logo {
  12. display: block;
  13. float: none;
  14. text-align: left;
  15. }
  16. }
  17. @media print {
  18. * {
  19. -webkit-filter: none !important; // Use in 41 Chrome
  20. background: transparent !important;
  21. color: @color-black !important;
  22. filter: none !important;
  23. text-shadow: none !important;
  24. }
  25. // Black prints faster:h5bp.com/s
  26. a,
  27. a:visited {
  28. text-decoration: underline !important;
  29. }
  30. // Don't show links for images, or javascript/internal links
  31. pre,
  32. blockquote {
  33. border: 1px solid @color-gray60;
  34. page-break-inside: avoid;
  35. }
  36. thead {
  37. display: table-header-group;
  38. }
  39. .table-wrapper table {
  40. width: 100%;
  41. td {
  42. width: auto;
  43. }
  44. table-layout: fixed;
  45. & > tfoot > tr:first-child {
  46. border-top: 1px solid @color-gray60;
  47. }
  48. }
  49. .box,
  50. tr,
  51. img {
  52. page-break-inside: avoid;
  53. }
  54. img {
  55. max-width: 100% !important;
  56. }
  57. @page {
  58. margin: 1cm;
  59. }
  60. .block-content,
  61. p,
  62. h2,
  63. h3 {
  64. orphans: 3;
  65. widows: 3;
  66. }
  67. .block-content {
  68. page-break-before: avoid;
  69. }
  70. .block-title,
  71. h2,
  72. h3 {
  73. page-break-after: avoid;
  74. }
  75. .nav-toggle {
  76. display: none !important;
  77. }
  78. .sidebar,
  79. .nav-sections,
  80. .header.content > *[class],
  81. .panel.wrapper > *[class],
  82. .footer.content > *[class] {
  83. display: none;
  84. }
  85. .logo,
  86. .footer .copyright {
  87. display: block !important;
  88. margin: 10px 0;
  89. }
  90. .order-details-items {
  91. .order-items {
  92. .order-gift-message {
  93. &:not(.expanded-content) {
  94. height: auto;
  95. visibility: visible;
  96. }
  97. }
  98. }
  99. }
  100. .column.main {
  101. float: none !important;
  102. width: 100% !important;
  103. }
  104. .breadcrumbs {
  105. margin: 0 auto;
  106. text-align: right;
  107. }
  108. .footer.content {
  109. padding: 0;
  110. }
  111. .hidden-print {
  112. display: none !important;
  113. }
  114. }