vindree

md-reader columnate printout

Sep 3rd, 2025
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.46 KB | None | 0 0
  1. /*
  2.     https://md-reader.github.io
  3.     https://patchworkpaladin.com/2025/05/26/pretty-printing-in-obsidian
  4. */
  5.  
  6. @media print {
  7.  
  8.     body {
  9.         column-count: 2;
  10.         column-gap: 2em;
  11.         line-height: 1.4;
  12.         /* font-family: 'Scaly Sans', sans-serif; */
  13.     }
  14.  
  15.     /* Remove margin from the first block element if it's a common type */
  16.     body > :first-child {
  17.         margin-block-start: 0 !important;
  18.     }
  19.  
  20.     p {
  21.         widows: 3;
  22.         orphans: 3;
  23.     }
  24.  
  25.     h2, h3, h4, h5, h6 {
  26.         page-break-after: avoid;
  27.         page-break-inside: avoid;
  28.     }
  29.  
  30.     h1 {
  31.         letter-spacing: 0.1em;
  32.         /* font-size: 3em; */
  33.         /* break-before: page; */
  34.         column-span: all;
  35.         /* text-align: center !important; */
  36.         /* color: #006400 !important; */
  37.         /* text-transform: uppercase !important; */
  38.     }
  39.  
  40.     ul, ol {
  41.         page-break-inside: avoid;
  42.     }
  43.  
  44.     li {
  45.         page-break-inside: avoid;
  46.     }
  47.  
  48.     table {
  49.         break-inside: avoid;
  50.         page-break-inside: avoid;
  51.     }
  52.  
  53.     .callout {
  54.         break-inside: avoid;
  55.         page-break-inside: avoid;
  56.     }
  57.     blockquote {
  58.         break-inside: avoid;
  59.         page-break-inside: avoid;
  60.     }
  61.  
  62.     .internal-embed {
  63.         column-span: all;
  64.         border: none;
  65.         box-shadow: none;
  66.         margin: 1em 0;
  67.         padding: 0;
  68.     }
  69.     .internal-embed .markdown-embed-title {
  70.         display: none;
  71.     }
  72.  
  73. }
Tags: CSS
Advertisement
Add Comment
Please, Sign In to add comment