Apply color theme to HTML page itself (#2132)
parent
17c27581b6
commit
cdc1d08267
|
@ -71,6 +71,7 @@
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overscroll-behavior-y: none;
|
overscroll-behavior-y: none;
|
||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
|
background-color: var(--background);
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
-ms-overflow-style: scrollbar;
|
-ms-overflow-style: scrollbar;
|
||||||
|
|
|
@ -23,6 +23,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||||
)
|
)
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
|
updateDocument(persisted.get('colorMode')) // set on load
|
||||||
return persisted.onUpdate(() => {
|
return persisted.onUpdate(() => {
|
||||||
setState(persisted.get('colorMode'))
|
setState(persisted.get('colorMode'))
|
||||||
updateDocument(persisted.get('colorMode'))
|
updateDocument(persisted.get('colorMode'))
|
||||||
|
|
|
@ -75,6 +75,7 @@
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overscroll-behavior-y: none;
|
overscroll-behavior-y: none;
|
||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
|
background-color: var(--background);
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
-ms-overflow-style: scrollbar;
|
-ms-overflow-style: scrollbar;
|
||||||
|
|
Loading…
Reference in New Issue