Apply color theme to HTML page itself (#2132)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user