File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
special-pages/pages/history/public Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change 22< html lang ="en ">
33< head >
44 < style >
5- body {
6- /* Token is replaced by native browser so background isn't white while History initializes */
7- --loading-color : $LOADING_COLOR$;
8- background: var (--loading-color );
5+ html , body {
6+ background : # fafafa ;
7+ }
8+ @media screen and (prefers-color-scheme : dark) {
9+ html , body {
10+ background : # 333 ;
11+ }
912 }
1013 </ style >
14+ < script >
15+ // $LOADING_COLOR$ is replaced by native via string interpolation.
16+ // This script must be in <head> to block rendering and prevent flash of wrong color.
17+ const loadingColor = "$LOADING_COLOR$" ;
18+ const hasLoadingColor = ! ! loadingColor && ! loadingColor . startsWith ( "$" ) ;
19+ if ( hasLoadingColor ) {
20+ document . documentElement . style . background = loadingColor ;
21+ }
22+ </ script >
1123 < title > History</ title >
1224 < meta name ="robots " content ="noindex,nofollow ">
1325 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
You can’t perform that action at this time.
0 commit comments