diff --git a/webviews/editorWebview/index.css b/webviews/editorWebview/index.css index 1870e2dfd7..18734a108e 100644 --- a/webviews/editorWebview/index.css +++ b/webviews/editorWebview/index.css @@ -1963,10 +1963,10 @@ h3 { font-weight: normal; } -/* Markdown headings, lists, and inline code follow github.com's markdown styles. The headers of comments in a review are in their review's comment body. */ +/* Markdown headings, lists, and inline code follow github.com's markdown styles. The headers of comments in a review are in their review's comment body; :where keeps excluding them from raising specificity above the .markdown-body edge margin resets. */ .comment-body h1, .comment-body h2, -.comment-body h3:not(.review-comment-header), +.comment-body h3:where(:not(.review-comment-header)), .comment-body h4, .comment-body h5, .comment-body h6 { @@ -1992,7 +1992,7 @@ h3 { font-size: 1.5em; } -.comment-body h3:not(.review-comment-header) { +.comment-body h3:where(:not(.review-comment-header)) { font-size: 1.25em; } diff --git a/webviews/editorWebview/test/timeline.test.tsx b/webviews/editorWebview/test/timeline.test.tsx index 6bf3cbe622..16376f664a 100644 --- a/webviews/editorWebview/test/timeline.test.tsx +++ b/webviews/editorWebview/test/timeline.test.tsx @@ -192,7 +192,8 @@ describe('Timeline', function () { }); assert(commentHeader); assert.deepStrictEqual(commentHeader, reviewHeader); - assert.strictEqual(window.getComputedStyle(view.container.querySelector('.markdown-body h3')!).fontSize, '1.25em'); + const { fontSize, marginTop, marginBottom } = window.getComputedStyle(view.container.querySelector('.markdown-body h3')!); + assert.deepStrictEqual({ fontSize, marginTop, marginBottom }, { fontSize: '1.25em', marginTop: '0px', marginBottom: '0px' }); } finally { styles.forEach(style => style.remove()); }