@@ -2269,28 +2269,8 @@ a, img {
22692269 }
22702270 }
22712271
2272- // highlight.js token colours for the signature block. The app's global hljs theme is
2273- // github-dark (locked, for the always-dark sidebar); override it within the hover so the
2274- // signature reads well on the light theme too. The chip background follows the editor theme,
2275- // so we use a GitHub-light palette in light mode and a GitHub-dark palette in dark mode.
2276- pre code .hljs { background : none ; }
2277- .hljs-keyword , .hljs-literal , .hljs-doctag , .hljs-meta .hljs-keyword { color : #cf222e ; }
2278- .hljs-string , .hljs-regexp , .hljs-meta-string { color : #0a3069 ; }
2279- .hljs-title , .hljs-title.function_ , .hljs-title.class_ , .hljs-section { color : #6639ba ; }
2280- .hljs-built_in , .hljs-type , .hljs-class .hljs-title { color : #953800 ; }
2281- .hljs-number , .hljs-symbol , .hljs-bullet { color : #0550ae ; }
2282- .hljs-attr , .hljs-attribute , .hljs-property , .hljs-variable , .hljs-params { color : @bc-text-emphasized ; }
2283- .hljs-comment , .hljs-quote , .hljs-meta { color : #6e7781 ; }
2284-
2285- .dark & {
2286- .hljs-keyword , .hljs-literal , .hljs-doctag , .hljs-meta .hljs-keyword { color : #ff7b72 ; }
2287- .hljs-string , .hljs-regexp , .hljs-meta-string { color : #a5d6ff ; }
2288- .hljs-title , .hljs-title.function_ , .hljs-title.class_ , .hljs-section { color : #d2a8ff ; }
2289- .hljs-built_in , .hljs-type , .hljs-class .hljs-title { color : #ffa657 ; }
2290- .hljs-number , .hljs-symbol , .hljs-bullet { color : #79c0ff ; }
2291- .hljs-attr , .hljs-attribute , .hljs-property , .hljs-variable , .hljs-params { color : @dark-bc-text-emphasized ; }
2292- .hljs-comment , .hljs-quote , .hljs-meta { color : #8b949e ; }
2293- }
2272+ // hljs token colours for the signature block are shared with the code-hint doc popup -
2273+ // see the `.lsp-hover-quickview, .lsp-hint-doc-popup` rule below.
22942274
22952275 // Inline code: parameter names, types, identifiers.
22962276 code {
@@ -2433,6 +2413,31 @@ a, img {
24332413}
24342414
24352415// LSP code-hint documentation popup (shown beside the code hint list)
2416+ // Shared highlight.js token colours for both LSP popups (hover signature + code-hint docs). The
2417+ // app's global hljs theme is github-dark (locked, for the always-dark sidebar); these override it
2418+ // so highlighted code reads well on the light theme too - GitHub-light palette in light mode,
2419+ // GitHub-dark in dark mode. `&` is the popup selector, so `.dark &` scopes both correctly.
2420+ .lsp-hover-quickview , .lsp-hint-doc-popup {
2421+ pre code .hljs { background : none ; }
2422+ .hljs-keyword , .hljs-literal , .hljs-doctag , .hljs-meta .hljs-keyword { color : #cf222e ; }
2423+ .hljs-string , .hljs-regexp , .hljs-meta-string { color : #0a3069 ; }
2424+ .hljs-title , .hljs-title.function_ , .hljs-title.class_ , .hljs-section { color : #6639ba ; }
2425+ .hljs-built_in , .hljs-type , .hljs-class .hljs-title { color : #953800 ; }
2426+ .hljs-number , .hljs-symbol , .hljs-bullet { color : #0550ae ; }
2427+ .hljs-attr , .hljs-attribute , .hljs-property , .hljs-variable , .hljs-params { color : @bc-text-emphasized ; }
2428+ .hljs-comment , .hljs-quote , .hljs-meta { color : #6e7781 ; }
2429+
2430+ .dark & {
2431+ .hljs-keyword , .hljs-literal , .hljs-doctag , .hljs-meta .hljs-keyword { color : #ff7b72 ; }
2432+ .hljs-string , .hljs-regexp , .hljs-meta-string { color : #a5d6ff ; }
2433+ .hljs-title , .hljs-title.function_ , .hljs-title.class_ , .hljs-section { color : #d2a8ff ; }
2434+ .hljs-built_in , .hljs-type , .hljs-class .hljs-title { color : #ffa657 ; }
2435+ .hljs-number , .hljs-symbol , .hljs-bullet { color : #79c0ff ; }
2436+ .hljs-attr , .hljs-attribute , .hljs-property , .hljs-variable , .hljs-params { color : @dark-bc-text-emphasized ; }
2437+ .hljs-comment , .hljs-quote , .hljs-meta { color : #8b949e ; }
2438+ }
2439+ }
2440+
24362441.lsp-hint-doc-popup {
24372442 display : none ;
24382443 position : fixed ;
0 commit comments