Updates daisy ui

This commit is contained in:
Rune Harlyk
2024-04-23 21:40:34 +02:00
committed by Rune Harlyk
parent 5609fe35d7
commit 9ca4381442
5 changed files with 11 additions and 12 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
export function daisyColor(name: string, opacity: number = 100) {
const color = getComputedStyle(document.documentElement).getPropertyValue(name);
return 'hsla(' + color + '/ ' + Math.min(Math.max(Math.round(opacity), 0), 100) + '%)';
return `oklch(${color} / ${opacity}%)`;
}
@@ -1,5 +1,5 @@
<script lang="ts">
import { onDestroy, onMount } from 'svelte';
import { onMount } from 'svelte';
import { page } from '$app/stores';
import SettingsCard from '$lib/components/SettingsCard.svelte';
import { slide } from 'svelte/transition';