markdown-viewer icon indicating copy to clipboard operation
markdown-viewer copied to clipboard

Feat theme GitHub no border

Open huangjj27 opened this issue 8 years ago • 5 comments
trafficstars

Hi, @simov! here is a small PR about removing the border of the github theme, for I found that it's weird to print a PDF using the github theme with border like this: image

as in the picture, you can notice that the boder breaks between pages, and I think a better output is like this: image

yesterday I've spent the whole on adding a new theme github-no-border, but I can't find out how to make it shown in the extension's popup, thus I walk around by modifying the existed github theme

huangjj27 avatar Oct 01 '17 03:10 huangjj27

Hi, @huangjj27

You should probably use a media query in case you don't want to see the border only when printing:

@media print {
  .markdown-body {
    border-width: 0px;
  }
}

I'm going to implement a few things in the upcoming month and I'll look at this issue :+1:

simov avatar Oct 01 '17 07:10 simov

I think it's a more better choice to introduce a new theme, however, I still not figure how to do this...

huangjj27 avatar Oct 03 '17 09:10 huangjj27

All available themes are listed here: https://github.com/simov/markdown-viewer/blob/master/manifest.json#L31-L55 though I don't think a new theme is needed for that.

simov avatar Oct 03 '17 15:10 simov

I'm sorry that I ignore this manifest.json for such a long time. I should have read the docs of chrome extension development!

The reason I think a new theme is better, is that maybe someone will want to print the PDF with border, and I shouldn't prevent them from doing so by adding a @media tag.

huangjj27 avatar Oct 03 '17 15:10 huangjj27

I've just view #45 about the print styling. So shall we make the github theme be without the border when we print it ?

huangjj27 avatar Feb 28 '18 09:02 huangjj27

Markdown Viewer v5 now comes with 30+ themes and all of them look great. My suggestion would be to have a look and see how the print styles look like on some of them. As for the GitHub theme and its printing styles in particular, in Markdown Viewer v5 there is also a new Width option that you can use to fix the content width of any theme. That also removes the border for the GitHub theme and subsequently when printed the border is not there as well.

simov avatar Dec 10 '22 18:12 simov