denco / vscode-confluence-markup

Visual Studio Code extension for Confluence® markup
MIT License
25 stars 10 forks source link

Improvement to CSS + Ability to Change Monospace Font for Preview #14

Closed macintacos closed 4 years ago

macintacos commented 4 years ago

Hello!

I was looking for an extension just like this, but I wanted to tweak the CSS a bit. The best way that I could find to actually do that was to just contribute it myself!

This update brings a few things:

  1. Each line is now wrapped in a <p> tag in the preview so that we get better padding. Before, you'd have to triple-return to get a legitimate line break, and that didn't really sit right with me. There were some minor caveats to this approach (had to add some formatting rules to accommodate code blocks) but I think that made the preview much more "breathable".
  2. I added some padding in the tables, because that was also making me claustrophobic :)
  3. I changed the font of most text to follow GitHub's way of doing things, to ensure that the experience is more consistent across users.
  4. I added a single configuration setting, confluenceMarkup.monospaceFont, to the extension's settings. This is what is used as the font-family value in all instances where code/monospaced fonts are rendered in the preview. This can now be modified to your heart's content!
  5. Bumped the version to 0.2.0 because of the implementation of the font-change feature. if you'd rather this be a patch release, then I'll leave that up to you.

Please let me know if you have any questions! Apologies about creating all of this from master branch on my own fork; in the future, I'll do everything from a develop branch in my own fork or something.

Once this is accepted, I was thinking about adding some more snippets, and improving on the description of the existing snippets so that it's a bit more obvious what they do.

macintacos commented 4 years ago

@denco friendly ping; I know that this is probably super low on your list of priorities, but was hoping to get this in as I use this extension a lot 😅

denco commented 4 years ago

@denco friendly ping; I know that this is probably super low on your list of priorities, but was hoping to get this in as I use this extension a lot sweat_smile

Hi, Thx for the contributing & PR.

Sorry, have a lot of tasks actually will try to release a new version till the end of weekend.

I've already merged your PR to 0.1.6 branch. For 0.2.0 I've already planned to use a tokenizer and use a custom css.

I will ajust a version, and another small changes.