feat(webui): add reading text size preferences (#6325)
* feat(webui): add reading text size preferences * fix(webui): align loading skeletons with reading typography
This commit is contained in:
1 parent
816c9221a0
commit
282839cc65
48 files changed
+662
-120
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import { useLayoutEffect } from "react";
|
||||
|
||||
import { useLocalPreferences } from "@/hooks/useLocalPreferences";
|
||||
|
||||
/** Project browser preferences onto text tokens, without scaling the UI or rem. */
|
||||
export function useReadingTypography(): void {
|
||||
const { readingTextSize } = useLocalPreferences();
|
||||
useLayoutEffect(() => {
|
||||
document.documentElement.dataset.readingTextSize = readingTextSize;
|
||||
}, [readingTextSize]);
|
||||
}
|
||||
Reference in new issue
Block a user