caponetto / vscode-diff-viewer

A simple VS Code extension to easily visualize git diff files.
https://marketplace.visualstudio.com/items?itemName=caponetto.vscode-diff-viewer&ssr=false#overview
MIT License
44 stars 5 forks source link

Control diff2html font sizes #59

Closed jacekkopecky closed 2 years ago

jacekkopecky commented 2 years ago

diff2html CSS sets font sizes to 10-15px, and font family to two Menlo, Consolas... In VSCode, I think we should honour editor font settings.

This PR does that. Because I'd prefer not to replicate the list of diff2html CSS classes that have font settings on them, I just use body * to win in specificity; but it means that where we set a font size ourselves, we have to do body <our selector> to get the right specificity for these settings to apply. It's a bit ugly, but I can't think of a cleaner solution right now.

Additionally, the PR sets line-height to 1.4 which is more than the default and more in line with the default styles in VSCode; I don't think there's an easy way of replicating the line height of the editor for this. The default is a bit too cramped.

Finally, while there, I also removed the file hiding workaround which is no longer necessary.

jacekkopecky commented 2 years ago

Thanks for merging!

1.3.1? 8-)

caponetto commented 2 years ago

Sure! I'll do it this week.

caponetto commented 2 years ago

@jacekkopecky done!

jacekkopecky commented 2 years ago

Thank you! If any issues come in because of my stuff, feel free to tag me.