Skip to content

Commit e369663

Browse files
committed
test
1 parent 6ab4f43 commit e369663

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

src/styles/index.css

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,20 @@ strong {
8989
word-break: break-word;
9090
}
9191

92-
/* Override browser extensions (1Password, etc.) that inject dark themes into code elements */
93-
/* Higher specificity to beat extension selectors */
94-
body :not(pre) > code,
95-
body table code:not(pre code),
96-
body .copyContainer > code {
92+
/* Override browser extensions (1Password, etc.) that inject dark themes into INLINE code elements ONLY */
93+
/* Specifically exclude pre>code blocks to preserve syntax highlighting */
94+
/* Target: inline code in paragraphs, tables, and CopyText components */
95+
body p code:not([class*="token"]),
96+
body li code:not([class*="token"]),
97+
body td code:not([class*="token"]),
98+
body th code:not([class*="token"]),
99+
body .copyContainer > code:not([class*="token"]),
100+
body h1 code:not([class*="token"]),
101+
body h2 code:not([class*="token"]),
102+
body h3 code:not([class*="token"]),
103+
body h4 code:not([class*="token"]),
104+
body h5 code:not([class*="token"]),
105+
body h6 code:not([class*="token"]) {
97106
background: var(--theme-code-inline-bg) !important;
98107
background-color: var(--theme-code-inline-bg) !important;
99108
color: var(--theme-code-inline-text) !important;
@@ -107,10 +116,13 @@ body .copyContainer > code {
107116
font-weight: bold !important;
108117
}
109118

110-
/* Override even if extensions add language-* classes */
111-
body :not(pre) > code[class*="language-"],
112-
body table code[class*="language-"]:not(pre code),
113-
body .copyContainer > code[class*="language-"] {
119+
/* Override even if extensions add language-* classes to inline code */
120+
/* Still exclude token classes to preserve Prism syntax highlighting */
121+
body p code[class*="language-"]:not([class*="token"]),
122+
body li code[class*="language-"]:not([class*="token"]),
123+
body td code[class*="language-"]:not([class*="token"]),
124+
body th code[class*="language-"]:not([class*="token"]),
125+
body .copyContainer > code[class*="language-"]:not([class*="token"]) {
114126
background: var(--theme-code-inline-bg) !important;
115127
background-color: var(--theme-code-inline-bg) !important;
116128
color: var(--theme-code-inline-text) !important;

0 commit comments

Comments
 (0)