fix(theme): allow raw html in head style

This commit is contained in:
2026-02-09 15:49:50 +01:00
parent 18802fdc10
commit d9c9bb5234
2 changed files with 1 additions and 17 deletions

View File

@@ -13,16 +13,6 @@
`#${value.map((c) => c.toString(16).padStart(2, '0')).join('')}`
);
let rValue = $state(value[0]);
let gValue = $state(value[1]);
let bValue = $state(value[2]);
$effect(() => {
rValue = value[0];
gValue = value[1];
bValue = value[2];
});
function handleHexInput(e: Event) {
const target = e.target as HTMLInputElement;
let val = target.value.replace(/[^0-9a-fA-F]/g, '');
@@ -41,12 +31,6 @@
] as [number, number, number];
}
}
function handleHexBlur() {
rValue = value[0];
gValue = value[1];
bValue = value[2];
}
</script>
<div class="flex overflow-hidden rounded-sm border border-outline bg-layer-2 w-min">
@@ -69,7 +53,6 @@
value={hexValue.slice(1)}
{id}
oninput={handleHexInput}
onblur={handleHexBlur}
maxlength={6}
class="w-15 bg-transparent text-text outline-none"
/>

View File

@@ -52,6 +52,7 @@
});
</script>
<svelte:head>
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html themeCss}
</svelte:head>