@@ -90,19 +90,22 @@ strong {
9090}
9191
9292/* Override browser extensions (1Password, etc.) that inject dark themes into INLINE code elements ONLY */
93- /* Specifically exclude pre> code blocks to preserve syntax highlighting */
93+ /* Specifically target ONLY inline code, never code inside pre tags or with token classes */
9494/* 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" ]),
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" ]),
9999body .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" ]) {
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" ]),
106+ body blockquote > code : not ([class *= "token" ]),
107+ body a > code : not ([class *= "token" ]),
108+ body span > code : not ([class *= "token" ]) {
106109 background : var (--theme-code-inline-bg ) !important ;
107110 background-color : var (--theme-code-inline-bg ) !important ;
108111 color : var (--theme-code-inline-text ) !important ;
@@ -116,24 +119,22 @@ body h6 code:not([class*="token"]) {
116119 font-weight : bold !important ;
117120}
118121
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" ]) {
126- background : var (--theme-code-inline-bg ) !important ;
127- background-color : var (--theme-code-inline-bg ) !important ;
128- color : var (--theme-code-inline-text ) !important ;
129- font-family : var (--font-mono ) !important ;
130- padding : var (--padding-block ) var (--padding-inline ) !important ;
131- border-radius : var (--border-radius ) !important ;
132- white-space : normal !important ;
133- word-break : break-word !important ;
122+ /* Make absolutely sure we NEVER style code blocks */
123+ pre code ,
124+ pre > code ,
125+ .code-block-container code ,
126+ [class *= "code-block" ] code {
127+ background : none !important ;
128+ background-color : transparent !important ;
129+ color : inherit !important ;
130+ font-family : inherit !important ;
131+ padding : 0 !important ;
132+ border-radius : 0 !important ;
133+ white-space : pre !important ;
134+ word-break : normal !important ;
134135 line-height : inherit !important ;
135- font-size : 0.85 em !important ;
136- font-weight : bold !important ;
136+ font-size : inherit !important ;
137+ font-weight : inherit !important ;
137138}
138139
139140/* Inline code in headings should inherit heading font size and weight */
0 commit comments