sbarex / QLMarkdown

macOS Quick Look extension for Markdown files.
GNU General Public License v3.0
1.38k stars 34 forks source link

Option to disable page border #113

Closed ottob closed 2 years ago

ottob commented 2 years ago

Thanks for a very useful plugin. I only have a small suggestion: right now there is a frame/border around the content:

Screenshot 2022-08-31 at 19 53 34

I think it looks a bit weird how the top border disappears into the top of the window, you can only see the top border if you try to scroll down.

Could you add an advanced option to disable the border? Or perhaps add some margin to the top so the top border becomes visible by default?

setanarut commented 2 years ago

Hello, I wrote this css property. You can set this by changing the CSS file.

Here is the relevant line;

https://github.com/sbarex/QLMarkdown/blob/b94a02dd2ef50c9080a965b93cd37a53e313daf3/Resources/default.css#L150

body {
  margin: 0;
  /* padding: 1em; */
  color: var(--textPrimary);
  background-color: var(--background);
}

/* If the window is bigger than 902 pixels, the border will be visible. */
@media (min-width: 902px) {
  article {
    border-radius: 8px;
    border-width: 1px;  
    border-style: solid;
    border-color: var(--body-border-color);
  }
}

article {
  margin: auto;
  max-width: 902px;
  font-size: inherit;
  line-height: 1.5;
  word-wrap: break-word;
  padding: 32px;
}

Relevant menu;

Ekran Resmi 2022-09-03 05 08 07

If you don't know CSS I can help.

setanarut commented 2 years ago

to remove the Border

Change this line https://github.com/sbarex/QLMarkdown/blob/b94a02dd2ef50c9080a965b93cd37a53e313daf3/Resources/default.css#L155

to; border-style: None;

ottob commented 2 years ago

Thanks for the help. That worked.