iamcco / markdown-preview.nvim

markdown preview plugin for (neo)vim
MIT License
6.82k stars 284 forks source link

Fix CSS with @media print to hide header when printing #533

Open martinschaer opened 1 year ago

martinschaer commented 1 year ago

If you print the document from the browser, the header shows up. I would expect it to be hidden. Additionally, the main content should have no padding –on print– to make a better use of the page size.

This could be a solution:

@media print {
  #page-header {
    display: none;
  }
  .markdown-body {
    padding: 0;
  }
}

Or is this intentional? If that is the case, maybe the user should be able to toggle the header (like the dark mode), to be able to print with or without it.