From f50c315477d6ec365088043decf03450ae23f91c Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Mon, 6 Feb 2023 17:25:23 +0100 Subject: [PATCH] Render permalinked lines in overview/description Fixes #4229 --- webviews/editorWebview/index.css | 74 ++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/webviews/editorWebview/index.css b/webviews/editorWebview/index.css index de690798fa..854a04f506 100644 --- a/webviews/editorWebview/index.css +++ b/webviews/editorWebview/index.css @@ -1149,3 +1149,77 @@ code { .title-editing-form > .form-actions { margin-left: 0; } + +/* permalinks */ +.comment-body .Box p { + margin-block-start: 0px; + margin-block-end: 0px; +} + +.comment-body .Box { + border-radius: 4px; + border-style: solid; + border-width: 1px; + border-color: var(--vscode-editorHoverWidget-border); +} + +.comment-body .Box-header { + background-color: var(--vscode-editorWidget-background); + color: var(--vscode-disabledForeground); + border-bottom-style: solid; + border-bottom-width: 1px; + padding: 8px 16px; + border-bottom-color: var(--vscode-editorHoverWidget-border); +} + +.comment-body .blob-num { + word-wrap: break-word; + box-sizing: border-box; + border: 0 !important; + padding-top: 0 !important; + padding-bottom: 0 !important; + min-width: 50px; + font-family: var(--vscode-editor-font-family); + font-size: 12px; + color: var(--vscode-editorLineNumber-foreground); + line-height: 20px; + text-align: right; + white-space: nowrap; + vertical-align: top; + cursor: pointer; + user-select: none; +} + +.comment-body .blob-num::before { + content: attr(data-line-number); +} + +.comment-body .blob-code-inner { + tab-size: 8; + border: 0 !important; + padding-top: 0 !important; + padding-bottom: 0 !important; + line-height: 20px; + vertical-align: top; + display: table-cell; + overflow: visible; + font-family: var(--vscode-editor-font-family); + font-size: 12px; + word-wrap: anywhere; + text-indent: 0; + white-space: pre-wrap; +} + +.comment-body .commit-tease-sha { + font-family: var(--vscode-editor-font-family); + font-size: 12px; +} + +/* Suggestion */ +.comment-body .blob-wrapper.data.file .d-table { + border-radius: 4px; + border-style: solid; + border-width: 1px; + border-collapse: unset; + border-color: var(--vscode-editorHoverWidget-border); +}