File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 62
62
setTheme ( )
63
63
// Can not get window.electron so check userAgent
64
64
const isElectron = navigator . userAgent . includes ( "Electron" )
65
- document . documentElement . dataset . buildType = isElectron ? "electron" : "web"
65
+ const isRN = window . __RN__
66
+ document . documentElement . dataset . buildType = isRN ? "rn" : isElectron ? "electron" : "web"
66
67
</ script >
67
68
< script >
68
69
const isMobile = window . innerWidth < 1024
69
70
document . documentElement . dataset . viewport = isMobile ? "mobile" : "desktop"
70
71
</ script >
71
72
</ head >
72
73
< body >
73
- < div id ="root " class =" bg-background " > </ div >
74
+ < div id ="root "> </ div >
74
75
75
76
< div id ="app-skeleton " class ="drag-region ">
76
77
<!-- Skeleton -->
77
78
< style >
79
+ [data-build-type = "rn" ] # root {
80
+ background-color : hsl (var (--background ));
81
+ }
78
82
html ,
79
83
body {
80
84
height : 100% ;
Original file line number Diff line number Diff line change 12
12
-webkit-tap-highlight-color : transparent;
13
13
}
14
14
15
+ [data-build-type = "rn" ] # root {
16
+ background-color : hsl (var (--background ));
17
+ }
18
+
15
19
html [data-viewport = "desktop" ],
16
20
html [data-viewport = "desktop" ] body ,
17
21
html [data-viewport = "desktop" ] # shadow-html ,
You can’t perform that action at this time.
0 commit comments