Sfoglia il codice sorgente

fix: adjust font size of code elements within headings to ensure consistent styling

Apply :has() selector to make code elements inherit font size from their heading parents.
This ensures visual consistency in markdown headings containing code blocks.
Takashi Fujita 10 mesi fa
parent
commit
1235db6c49
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      webview-ui/src/components/common/MarkdownBlock.tsx

+ 4 - 0
webview-ui/src/components/common/MarkdownBlock.tsx

@@ -63,6 +63,10 @@ const StyledMarkdown = styled.div`
 		white-space: pre-wrap;
 	}
 
+ 	:where(h1, h2, h3, h4, h5, h6):has(code) code {
+    		font-size: inherit;
+ 	}
+
 	pre > code {
 		.hljs-deletion {
 			background-color: var(--vscode-diffEditor-removedTextBackground);