Skip to content

Commit

Permalink
fix(TooltipItem): Use Tailwind 3 and 4 compatibility CSS variable cus…
Browse files Browse the repository at this point in the history
…tom value
  • Loading branch information
techniq committed Feb 10, 2025
1 parent 956372a commit 8ed4684
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/warm-seahorses-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': patch
---

fix(TooltipItem): Use Tailwind 3 and 4 compatibility CSS variable custom value
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
>
{#if color}
<div
class={cls('color', 'inline-block size-2 rounded-full bg-[--color]', classes.color)}
class={cls('color', 'inline-block size-2 rounded-full bg-[var(--color)]', classes.color)}
style:--color={color}
></div>
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class={cls('label', 'flex items-center gap-2 whitespace-nowrap', classes.label)}>
{#if color}
<div
class={cls('color', 'inline-block size-2 rounded-full bg-[--color]', classes.color)}
class={cls('color', 'inline-block size-2 rounded-full bg-[var(--color)]', classes.color)}
style:--color={color}
></div>
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
{curve}
style="--group-color:{groupColor(group)}"
classes={{
path: 'pointer-events-none stroke-[--group-color] fill-[--group-color] [fill-opacity:0.1]',
path: 'pointer-events-none stroke-[var(--group-color)] fill-[var(--group-color)] [fill-opacity:0.1]',
}}
/>
{/each}
Expand Down

0 comments on commit 8ed4684

Please sign in to comment.