Skip to content

Commit ded9423

Browse files
Get rid of class directives
1 parent b75c653 commit ded9423

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/lib/components/renderers/ListElementRenderer.svelte

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@
4343

4444
<li
4545
bind:this={data}
46-
class:dark:font-bold={data?.innerText.startsWith("breaking:")}
47-
class:font-semibold={data?.innerText.startsWith("breaking:")}
48-
class="group *:inline"
46+
class={[
47+
"group *:inline",
48+
{
49+
"dark:font-bold": data?.innerText.startsWith("breaking:"),
50+
"font-semibold": data?.innerText.startsWith("breaking:")
51+
}
52+
]}
4953
>
5054
{@render children?.()}
5155
{#if allLinks.length > 0}

src/routes/+layout.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,12 @@
137137
class="sticky top-0 z-40 w-full bg-background/95 shadow-sm backdrop-blur supports-[backdrop-filter]:bg-background/60"
138138
>
139139
<div
140-
class="border-b transition-colors duration-500"
141-
class:border-transparent={!newsToDisplay && scrollY < 25}
140+
class={[
141+
"border-b transition-colors duration-500",
142+
{
143+
"border-transparent": !newsToDisplay && scrollY < 25
144+
}
145+
]}
142146
>
143147
<div class="mx-auto flex h-14 w-full items-center px-8">
144148
<!-- Left part -->

0 commit comments

Comments
 (0)