Skip to content

Commit becf0b5

Browse files
committed
Fixes microsoft#19979: Align codelens text to the bottom
1 parent 29c4e31 commit becf0b5

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/vs/editor/contrib/codelens/browser/codelens.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
text-overflow: ellipsis;
1010
font-size: 90%;
1111
color: #999999;
12-
vertical-align: sub;
1312
}
1413

1514
.monaco-editor .codelens-decoration > span,
@@ -19,6 +18,7 @@
1918
-ms-user-select: none;
2019
user-select: none;
2120
white-space: nowrap;
21+
vertical-align: sub;
2222
}
2323

2424
.monaco-editor .codelens-decoration > a {

src/vs/editor/contrib/codelens/browser/codelens.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ class CodeLensContentWidget implements editorBrowser.IContentWidget {
7171
this.setSymbolRange(symbolRange);
7272

7373
this._domNode = document.createElement('span');
74-
this._domNode.style.height = `${editor.getConfiguration().lineHeight}px`;
74+
const lineHeight = editor.getConfiguration().lineHeight;
75+
this._domNode.style.height = `${lineHeight}px`;
76+
this._domNode.style.lineHeight = `${lineHeight}px`;
7577
this._domNode.innerHTML = ' ';
7678
dom.addClass(this._domNode, 'codelens-decoration');
7779
dom.addClass(this._domNode, 'invisible-cl');

0 commit comments

Comments
 (0)