This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Write your global styles here, in PostCSS syntax */ | |
@tailwind base; | |
@tailwind components; | |
@tailwind utilities; | |
@layer base { | |
:root { | |
--background: 200 15% 95%; /* Light neutral slate */ | |
--foreground: 200 20% 20%; /* Dark slate */ | |
--muted: 200 15% 90%; /* Lighter neutral slate */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Author: Robert Baddeley (waffleflopper) | |
* 2023 | |
*/ | |
/* helper */ | |
function clamp(num: number, min: number, max: number): number { | |
return Math.min(Math.max(num, min), max); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Derived from https://github.com/skeletonlabs/skeleton/blob/dev/packages/skeleton/src/lib/utilities/LightSwitch/LightSwitch.svelte --> | |
<script lang="ts"> | |
import { Moon, Sun } from 'lucide-svelte'; | |
import { onMount } from 'svelte'; | |
import { twc } from '$utils/class'; | |
let className = ''; | |
export { className as class }; | |
import { getModeOsPrefers, modeCurrent, setModeCurrent, setModeUserPrefers } from './darkSwitch'; |