diff options
| author | Bobby <[email protected]> | 2026-04-22 09:19:50 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-04-22 09:19:50 +0530 |
| commit | 7d21ed8f09e60d3ed962bedcf304a5e17e07b2d8 (patch) | |
| tree | 85772db514216c5d71f7963b7a730b164f09bff6 /lib/reading/state.ts | |
| parent | 3184ffcec523d19dafa11955778a2e5dafc23843 (diff) | |
| download | hollowdark-7d21ed8f09e60d3ed962bedcf304a5e17e07b2d8.tar.xz hollowdark-7d21ed8f09e60d3ed962bedcf304a5e17e07b2d8.zip | |
Rebuild Settings with Reading, Sound, Accessibility, and About sections per the mockup
Diffstat (limited to 'lib/reading/state.ts')
| -rw-r--r-- | lib/reading/state.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/reading/state.ts b/lib/reading/state.ts new file mode 100644 index 0000000..5194d0a --- /dev/null +++ b/lib/reading/state.ts @@ -0,0 +1,11 @@ +import { writable, type Writable } from 'svelte/store' + +/** Text-size scale presets. Each maps to a class on the document root. */ +export type TextSize = 'small' | 'medium' | 'large' | 'extra-large' + +/** + * Reader's chosen text size. Drives the `--text-*` custom properties + * through a class on `<html>` that swaps the whole scale at once. The + * layout subscribes to this store and applies the class. + */ +export const textSize: Writable<TextSize> = writable('medium') |
