feat: add debug outlines functionality

This commit is contained in:
madkarmaa 2025-05-09 13:30:28 +02:00
parent 9dc01dbfc4
commit 63a0e68d24

View File

@ -9,6 +9,9 @@
type Props = { children: Snippet }; type Props = { children: Snippet };
let { children }: Props = $props(); let { children }: Props = $props();
// set this to true to enable debug outlines on all elements
const debug = false;
$effect(() => { $effect(() => {
document.documentElement.setAttribute('data-event-name', $event); document.documentElement.setAttribute('data-event-name', $event);
}); });
@ -21,3 +24,12 @@
{@render children()} {@render children()}
</main> </main>
<Footer /> <Footer />
{#if debug}
<style global>
* {
outline: 1px solid #f002 !important;
outline-offset: -1px;
}
</style>
{/if}