chore: Svelte 5 syntax updates, a11y fixes, and dead CSS removal
All checks were successful
CI / update (push) Successful in 4m29s

Replace deprecated svelte:component with direct component invocation,
use span instead of label for non-input controls with role="group",
remove unused imports and dead CSS rules.
This commit is contained in:
2026-04-03 08:44:32 +02:00
parent 8a14230d00
commit 88f3909634
7 changed files with 20 additions and 35 deletions

View File

@@ -1,6 +1,6 @@
<script lang="ts">
import { enhance } from '$app/forms';
import { tick } from 'svelte';
import { tick, untrack } from 'svelte';
import type { ActionData, PageData } from './$types';
import SaveFab from '$lib/components/SaveFab.svelte';
import Cross from '$lib/assets/icons/Cross.svelte';
@@ -282,7 +282,7 @@
// Pre-init all toggles to false (prevents bind:checked={undefined}), then load real state
initGlobalToggles();
if (nutritionMappings.length > 0) {
if (untrack(() => nutritionMappings).length > 0) {
loadGlobalOverwrites().then(() => {
// Re-init with real overwrite data (overwrite the false defaults)
for (const m of nutritionMappings) {
@@ -474,20 +474,6 @@
h3 {
text-align: center;
}
button.action_button {
animation: unset !important;
font-size: 1.3rem;
color: white;
}
.submit_buttons {
display: flex;
margin-inline: auto;
max-width: 1000px;
margin-block: 1rem;
justify-content: center;
align-items: center;
gap: 2rem;
}
@media (prefers-color-scheme: dark) {
:global(:root:not([data-theme="light"])) .title {
background-color: var(--nord6-dark);