File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 3
3
### Features
4
4
5
5
- ` ReferenceType ` s which reference an external symbol will now include ` qualifiedName ` and ` package ` in their serialized JSON.
6
+ - Added new ` cname ` option for GitHub Pages custom domain support, #1803
6
7
7
8
### Bug Fixes
8
9
9
10
- Fixed line height of ` h1 ` and ` h2 ` elements being too low, #1796 .
10
- - Symbol names passed to ` addUnknownSymbolResolver ` will now be correctly given the qualified name to the symbol being referenced.
11
-
12
- ### Features
13
-
14
- - Added new ` cname ` option for GitHub Pages custom domain support, #1803
11
+ - Code blocks in the light theme will no longer have the same background as the rest of the page, #1836 .
12
+ - Symbol names passed to ` addUnknownSymbolResolver ` will now be correctly given the qualified name to the symbol being referenced, #1832 .
15
13
16
14
## v0.22.10 (2021-11-25)
17
15
Original file line number Diff line number Diff line change @@ -88,7 +88,15 @@ class DoubleHighlighter {
88
88
i ++ ;
89
89
}
90
90
91
- style . push ( ` --light-code-background: ${ this . highlighter . getTheme ( this . light ) . bg } ;` ) ;
91
+ // GH#1836, our page background is white, but it would be nice to be able to see
92
+ // a difference between the code blocks and the background of the page. There's
93
+ // probably a better solution to this... revisit once #1794 is merged.
94
+ let lightBackground = this . highlighter . getTheme ( this . light ) . bg ;
95
+ if ( isWhite ( lightBackground ) ) {
96
+ lightBackground = "#F5F5F5" ;
97
+ }
98
+
99
+ style . push ( ` --light-code-background: ${ lightBackground } ;` ) ;
92
100
style . push ( ` --dark-code-background: ${ this . highlighter . getTheme ( this . dark ) . bg } ;` ) ;
93
101
lightRules . push ( ` --code-background: var(--light-code-background);` ) ;
94
102
darkRules . push ( ` --code-background: var(--dark-code-background);` ) ;
@@ -163,3 +171,8 @@ export function getStyles(): string {
163
171
assert ( highlighter , "Tried to highlight with an uninitialized highlighter" ) ;
164
172
return highlighter . getStyles ( ) ;
165
173
}
174
+
175
+ function isWhite ( color : string ) {
176
+ const colors = new Set ( color . toLowerCase ( ) . replace ( / [ ^ a - f 0 - 9 ] / g, "" ) ) ;
177
+ return colors . size === 1 && colors . has ( "f" ) ;
178
+ }
You can’t perform that action at this time.
0 commit comments