CertificatePrint.css: Difference between revisions

From Claremont MakerSpace
(Created page with "#cert-data { string-set: certname attr(data-name), certversion attr(data-version); →‎Can't be `display: none;`, as it breaks string-set: visibil...")
 
No edit summary
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
#cert-data {
.mw-body-content li::marker {
    string-set: certname attr(data-name),
     content: "□\00A0";
                certversion attr(data-version);
     padding-right: 1em;
    /* Can't be `display: none;`, as it breaks string-set */
     visibility: hidden;
     position: absolute;
    bottom: 0px;
}
}


.checklist li::marker {
.nochecklist li::marker,
     content: "□\00A0";
.wikitable li::marker,
     padding-right: 1em;
.toc li::marker {
     content: initial;
     padding-right: initial;
}
}


@media not print {
@media not print {
     .print-only {
     .print-only, .print-warning {
         display: none;
         display: none;
     }
     }
Line 20: Line 18:


@media print {
@media print {
     /* Add link target as text */
     .print-warning {
    a::after {
         position: fixed;
        content: " [" attr(href) "]";
         left: 0;
        color: initial;
         top: 0;
        text-decoration: none;
         background: white;
    }
        width: 100vw;
 
         height: 100vh;
    @page {
         size: letter portrait;
         margin: 1in;
 
         @top-left {
            content: "Certification: " string(certname);
            font-size: 1.2em;
            color: #444;
            vertical-align: bottom;
            padding-bottom: 0.2em;
         }
 
        @top-right {
            content: '';
            background-image: url("https://claremontmakerspace.org/wp-content/uploads/2018/06/cms_logo.png");
            background-repeat: no-repeat;
            background-position: bottom;
            background-size: 100%;
            width: 7em;
         }
 
        @bottom-left {
            content: string(certversion);
            color: #444;
        }
 
        @bottom-right-corner {
            content: counter(page);
        }
     }
     }
}
}

Latest revision as of 19:54, 4 November 2020

.mw-body-content li::marker {
    content: "□\00A0";
    padding-right: 1em;
}

.nochecklist li::marker, 
.wikitable li::marker,
.toc li::marker {
    content: initial;
    padding-right: initial;
}

@media not print {
    .print-only, .print-warning {
        display: none;
    }
}

@media print {
    .print-warning {
        position: fixed;
        left: 0;
        top: 0;
        background: white;
        width: 100vw;
        height: 100vh;
    }
}