-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFretNote.svelte
More file actions
63 lines (51 loc) · 1.5 KB
/
Copy pathFretNote.svelte
File metadata and controls
63 lines (51 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<script>
let { note } = $props();
// Check if note is in the selected position (for position filtering)
let inPosition = $derived(note.inPosition !== false);
</script>
<g
data-interval={note.interval}
data-in-scale={!!note.interval}
data-in-position={inPosition}
data-fret={note.fret}
class:in-scale={!!note.interval}
class:in-position={inPosition}
class="fret-note">
<circle class="fret-note-background" r="12"></circle>
<text
dy="1"
font-size="12"
text-anchor="middle"
class="fret-note-text"
dominant-baseline="middle">{note.label}</text>
</g>
<style>
@reference "tailwindcss";
.fret-note-background {
@apply fill-transparent;
}
.fret-note-text {
@apply text-xs fill-gray-500 dark:fill-blue-500;
}
.fret-note:not(.in-position):is(.in-scale) .fret-note-background {
@apply hidden;
}
.fret-note:not(.in-position):is(.in-scale) .fret-note-text {
@apply font-normal fill-gray-500 dark:fill-blue-500;
}
.in-scale .fret-note-background {
@apply fill-blue-400 stroke-0 stroke-sky-800 dark:fill-blue-900 dark:stroke-sky-800;
}
.in-scale .fret-note-text {
@apply fill-white font-black;
}
.in-scale[data-interval="1P"] circle {
@apply fill-gray-800 stroke-1 stroke-gray-900 dark:fill-blue-600 dark:stroke-blue-300;
}
.in-scale[data-interval="1P"] .fret-note-text {
@apply dark:fill-blue-100;
}
.in-scale:is([data-interval^="3"], [data-interval^="5"]) circle {
@apply fill-blue-700 stroke-1 stroke-blue-600;
}
</style>