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