Skip to content

Commit b44523c

Browse files
committed
fix: no longer derive colours, use "currentColor" for svgs now
1 parent f13db4f commit b44523c

2 files changed

Lines changed: 3 additions & 17 deletions

File tree

src/App.svelte

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,10 @@
33
import Clock from "./lib/components/Clock.svelte";
44
import SocialsRow from "./lib/components/SocialsRow.svelte";
55
6-
import { theme } from "./lib/state/theme.svelte";
76
import { onMount } from "svelte";
87
98
let scrollIndicator: SVGElement;
109
11-
let textColour = $derived(
12-
theme.isDark
13-
? "oklch(0.9644 0.0282 74.31)"
14-
: "oklch(0.2316 0.0373 288.04)",
15-
);
16-
1710
function removeScrollIndicator() {
1811
scrollIndicator.classList.remove("animate-bounce");
1912
scrollIndicator.classList.add("slide-down");
@@ -55,7 +48,7 @@
5548
>
5649
<path
5750
d="M15 15 L30 30 L45 15"
58-
stroke={textColour}
51+
stroke="currentColor"
5952
stroke-width="2"
6053
fill="none"
6154
/>

src/lib/components/Clock.svelte

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
<script lang="ts">
22
import { onDestroy, onMount } from "svelte";
33
import ThemeToggle from "./ThemeToggle.svelte";
4-
import { theme } from "../state/theme.svelte";
5-
6-
let textColour = $derived(
7-
theme.isDark
8-
? "oklch(0.9644 0.0282 74.31)"
9-
: "oklch(0.2316 0.0373 288.04)",
10-
);
114
125
let marker: HTMLDivElement;
136
@@ -108,7 +101,7 @@
108101
cy="50"
109102
r="45"
110103
fill="transparent"
111-
stroke={textColour}
104+
stroke="currentColor"
112105
stroke-width="5"
113106
stroke-dasharray="10 100 10"
114107
vector-effect="non-scaling-stroke"
@@ -129,7 +122,7 @@
129122
cy="50"
130123
r="25"
131124
fill="transparent"
132-
stroke={textColour}
125+
stroke="currentColor"
133126
stroke-width="3"
134127
stroke-dasharray="20 80 50"
135128
vector-effect="non-scaling-stroke"

0 commit comments

Comments
 (0)