Skip to content

Commit

Permalink
Control diff2html font sizes (#59)
Browse files Browse the repository at this point in the history
* Remove outdated workaround

* Control diff2html font sizes

* ⬆️ diff2html 3.4.19
  • Loading branch information
jacekkopecky authored Oct 1, 2022
1 parent 2fbb77c commit dbd1afa
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"prepare": "husky install"
},
"dependencies": {
"diff2html": "3.4.18",
"diff2html": "3.4.19",
"highlight.js": "^11.6.0"
},
"devDependencies": {
Expand Down
13 changes: 11 additions & 2 deletions src/webview/css/static/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@ body {
flex-direction: column;
}

footer {
body * {
font-size: var(--vscode-editor-font-size);
line-height: 1.4;
}

.d2h-diff-table {
font-family: var(--vscode-editor-font-family);
}

body footer {
position: sticky;
bottom: 0;
text-align: right;
Expand All @@ -24,7 +33,7 @@ label.d2h-file-collapse {
position: relative;
}

input.changed-since-last-view:before {
body input.changed-since-last-view:before {
content: "Changed since last view";
white-space: pre;
position: absolute;
Expand Down
5 changes: 0 additions & 5 deletions src/webview/css/static/diff2html-tweaks.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ ins {
z-index: 1;
}

/* workaround until https://github.com/rtfpessoa/diff2html/pull/445 is merged */
.d2h-d-none {
display: none !important;
}

/* only show line numbers as clickable when they apply to the newer file */
.d2h-code-linenumber.d2h-del,
.d2h-code-linenumber.d2h-info,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1777,10 +1777,10 @@ diff-sequences@^28.1.1:
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6"
integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==

[email protected].18:
version "3.4.18"
resolved "https://registry.yarnpkg.com/diff2html/-/diff2html-3.4.18.tgz#1f68caf8d55ade5c0e6fdcf0def5f182b1d1dd52"
integrity sha512-eZP1vKjCNMPFpCoY0+ATZYTgdUUriUTLxRLjjAx6qPje7orIirtTkW3ghVcz3dIBjcum47AGIHBHpLhdrdS7aw==
[email protected].19:
version "3.4.19"
resolved "https://registry.yarnpkg.com/diff2html/-/diff2html-3.4.19.tgz#6150ed253957e22f38f078a5fb1b70d27eb9ce6c"
integrity sha512-23tBeyRxcw31p/XlEn9ZGYP9mRQRL3cB25aigrWV29UUUmEnlHnmUpFWGKVSiCJXoize+31SV412BYmdilRqEw==
dependencies:
diff "5.1.0"
hogan.js "3.0.2"
Expand Down

0 comments on commit dbd1afa

Please sign in to comment.