Something went wrong. Try again.
Fork of backnotprop/plannotator with reduced surface area
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446/* Print Stylesheet — optimized for white paper output without annotations. * * Two-pronged approach: * 1. @media print — standard print styles * 2. .plannotator-print — class added via JS beforeprint/afterprint events * to guarantee overrides that @media print alone cannot achieve * (e.g. beating Tailwind layers + hljs github-dark theme). */
/* ============================================================ * CLASS-BASED OVERRIDES — applied via beforeprint/afterprint JS * These use .plannotator-print on <html> for maximum specificity. * ============================================================ */
/* Code blocks: override github-dark.css .hljs{background:#0d1117} */.plannotator-print pre,.plannotator-print pre[class] { background: #f5f5f5 !important; background-color: #f5f5f5 !important; color: #1a1a1a !important; border: 1px solid #ccc !important; border-left: 3px solid #888 !important;}
.plannotator-print pre code,.plannotator-print code.hljs,.plannotator-print pre code.hljs,.plannotator-print .hljs { background: transparent !important; background-color: transparent !important; color: #1a1a1a !important;}
.plannotator-print pre span,.plannotator-print pre code span,.plannotator-print .hljs span,.plannotator-print [class*="hljs-"] { color: #1a1a1a !important; background: transparent !important; background-color: transparent !important; text-decoration: none !important; font-style: normal !important;}
/* Inline code */.plannotator-print code { background: #e8e8e8 !important; background-color: #e8e8e8 !important; color: #1a1a1a !important; border: 1px solid #ccc !important;}
/* Inline code inside pre should be transparent (not gray pill) */.plannotator-print pre code { background: transparent !important; background-color: transparent !important; border: none !important;}
/* ============================================================ * @media print — layout, visibility, typography * ============================================================ */
@media print { /* ========== Reset & Page ========== */
* { transition: none !important; animation: none !important; }
@page { size: A4; margin: 0.75in; }
html, body { margin: 0; padding: 0; background: white !important; color: #1a1a1a !important; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; line-height: 1.6; font-size: 11pt; overflow: visible !important; height: auto !important; }
/* ========== Hide UI Chrome ========== */
header { display: none !important; }
aside { display: none !important; }
.annotation-toolbar { display: none !important; }
.fixed { display: none !important; }
[data-resize-handle] { display: none !important; }
/* Hide overlay scrollbars during print */ .os-scrollbar { display: none !important; }
[data-print-hide] { display: none !important; margin: 0 !important; padding: 0 !important; }
.sidebar-tab-flag { display: none !important; }
pre .absolute, .group > button.absolute { display: none !important; }
button[title="Settings"], button[title="Toggle theme"], button[title="Add global comment"], button[title="Copy plan"], button[title="Copy file"] { display: none !important; }
/* ========== Main Content Area ========== */
[data-print-region="root"] { height: auto !important; overflow: visible !important; }
[data-print-region="content"] { overflow: visible !important; }
main, [data-print-region="document"] { width: 100% !important; overflow: visible !important; background: white !important; background-image: none !important; padding: 0 !important; }
main > div { padding: 0 !important; margin: 0 !important; }
/* OverlayScrollbars wraps <main> with elements that default to `overflow: hidden !important` and fixed viewport heights, which beats `main { overflow: visible !important }` on specificity and clips long plans to the visible viewport during print. Override by targeting the library's own attribute selectors. */ [data-overlayscrollbars~="host"], [data-overlayscrollbars-padding], [data-overlayscrollbars-viewport] { overflow: visible !important; height: auto !important; max-height: none !important; display: block !important; }
article, [data-print-region="article"] { width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 0 !important; background: white !important; border: none !important; border-radius: 0 !important; box-shadow: none !important; }
/* Collapse first heading top margin for tight print layout */ article h1:first-of-type, [data-print-region="article"] h1:first-of-type { margin-top: 0 !important; }
/* ========== Typography ========== */
body, div, span, p, li, td, th, label, strong, em, b, i { color: #1a1a1a !important; }
strong, b { font-weight: bold !important; color: #000 !important; }
em, i { font-style: italic !important; color: #1a1a1a !important; }
h1 { font-size: 24pt; font-weight: bold; margin: 1.5em 0 0.5em 0; page-break-after: avoid; color: #000 !important; }
h2 { font-size: 18pt; font-weight: bold; margin: 1.25em 0 0.4em 0; page-break-after: avoid; color: #000 !important; }
h3 { font-size: 14pt; font-weight: bold; margin: 1em 0 0.3em 0; page-break-after: avoid; color: #000 !important; }
h4 { font-size: 12pt; font-weight: bold; margin: 0.8em 0 0.25em 0; page-break-after: avoid; color: #000 !important; }
h5, h6 { font-size: 11pt; font-weight: bold; margin: 0.6em 0 0.2em 0; page-break-after: avoid; color: #000 !important; }
p { margin: 0.5em 0; color: #1a1a1a !important; }
/* ========== Lists ========== */
ul, ol { margin: 0.5em 0; padding-left: 2em; }
li { margin: 0.25em 0; color: #1a1a1a !important; }
li p { margin: 0.25em 0; }
/* ========== Code & Preformatted ========== */
code, code[class] { font-family: 'Courier New', Monaco, Consolas, monospace !important; font-size: 10pt !important; background: #e8e8e8 !important; background-color: #e8e8e8 !important; color: #1a1a1a !important; padding: 0.1em 0.4em !important; border-radius: 3px !important; border: 1px solid #ccc !important; }
.group { page-break-inside: avoid; }
pre, pre[class] { margin: 1em 0 !important; padding: 1em !important; background: #f5f5f5 !important; background-color: #f5f5f5 !important; border: 1px solid #ccc !important; border-left: 3px solid #888 !important; border-radius: 4px !important; page-break-inside: avoid; overflow: visible !important; color: #1a1a1a !important; }
pre code, pre code[class], pre code.hljs, code.hljs, code[data-highlighted] { font-size: 9pt !important; background: transparent !important; background-color: transparent !important; color: #1a1a1a !important; padding: 0 !important; border: none !important; display: block !important; white-space: pre-wrap !important; word-wrap: break-word !important; }
.hljs { background: transparent !important; background-color: transparent !important; color: #1a1a1a !important; }
pre span, pre code span, .hljs span, code span, [class*="hljs-"] { color: #1a1a1a !important; background: transparent !important; background-color: transparent !important; text-decoration: none !important; font-style: normal !important; }
/* ========== Tables ========== */
table { margin: 1em 0; border-collapse: collapse; width: 100%; page-break-inside: avoid; }
thead { background: #e8e8e8 !important; page-break-after: avoid; }
th { font-weight: bold; text-align: left; padding: 0.5em; border: 1px solid #999; color: #000 !important; background: #e8e8e8 !important; }
td { padding: 0.5em; border: 1px solid #ccc; color: #1a1a1a !important; }
tbody tr:nth-child(even) { background: #f9f9f9 !important; }
tbody tr:nth-child(odd) { background: white !important; }
/* ========== Blockquotes ========== */
blockquote { margin: 1em 0; padding: 0.5em 0 0.5em 1em; border-left: 4px solid #999 !important; background: #f7f7f7 !important; color: #333 !important; }
blockquote p { margin: 0.5em 0; }
/* ========== Horizontal Rules ========== */
hr { margin: 1.5em 0; border: none; border-top: 1px solid #999; page-break-after: avoid; }
/* ========== Links ========== */
a { color: #0066cc !important; text-decoration: underline; }
a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #666 !important; word-break: break-all; }
a[href^="#"]::after { content: ""; }
/* ========== Images ========== */
img { max-width: 100%; height: auto; page-break-inside: avoid; margin: 1em 0; }
/* ========== Diagrams (Mermaid, Graphviz) ========== */
svg { max-width: 100%; height: auto !important; page-break-inside: avoid; }
/* ========== Page Break Hints ========== */
h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
pre, blockquote, table, figure { page-break-inside: avoid; }
/* ========== Print colour control ========== */
* { -webkit-print-color-adjust: exact; print-color-adjust: exact; }}