print.less 2.41 KB
Newer Older
Ketan's avatar
Ketan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

@import 'source/lib/_lib.less'; // Global lib
@import 'source/_theme.less'; // Theme overrides
@import 'source/_variables.less'; // Local theme variables

@baseDir: '../'; // Default

//  Magento/blank
.page-print {
    .logo {
        display: block;
        float: none;
        text-align: left;
    }
}

@media print {
    * {
        -webkit-filter: none !important; // Use in 41 Chrome
        background: transparent !important;
        color: @color-black !important;
        filter: none !important;
        text-shadow: none !important;
    }

    //  Black prints faster:h5bp.com/s
    a,
    a:visited {
        text-decoration: underline !important;
    }

    //  Don't show links for images, or javascript/internal links
    pre,
    blockquote {
        border: 1px solid @color-gray60;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

    .table-wrapper table {
        width: 100%;

        td {
            width: auto;
        }

        table-layout: fixed;

        & > tfoot > tr:first-child {
            border-top: 1px solid @color-gray60;
        }
    }

    .box,
    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 1cm;
    }

    .block-content,
    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    .block-content {
        page-break-before: avoid;
    }

    .block-title,
    h2,
    h3 {
        page-break-after: avoid;
    }

    .nav-toggle {
        display: none !important;
    }

    .sidebar,
    .nav-sections,
    .header.content > *[class],
    .panel.wrapper > *[class],
    .footer.content > *[class] {
        display: none;
    }

    .logo,
    .footer .copyright {
        display: block !important;
        margin: 10px 0;
    }

    .order-details-items {
        .order-items {
            .order-gift-message {
                &:not(.expanded-content) {
                    height: auto;
                    visibility: visible;
                }
            }
        }
    }

    .column.main {
        float: none !important;
        width: 100% !important;
    }

    .breadcrumbs {
        margin: 0 auto;
        text-align: right;
    }

    .footer.content {
        padding: 0;
    }

    .hidden-print {
        display: none !important;
    }
}