Skip to content

Commit

Permalink
Merge pull request #353 from EthanThatOneKid/play/style-directive-1
Browse files Browse the repository at this point in the history
Implemented Svelte style directive where applicable
  • Loading branch information
Mike committed Mar 26, 2022
2 parents 42d54a7 + e2820b6 commit b783503
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/events/event-item.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
});
</script>

<div class="event-box" style={`--highlights: var(--acm-${info.acmPath.slug}-rgb)`}>
<div class="event-box" style:--highlights={`var(--acm-${info.acmPath.slug}-rgb)`}>
<!-- Workaround for the top panel covering the event card's anchor. -->
<div class="anchor" id={info.slug} bind:this={anchor} />
<details class="event-card" bind:this={details}>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/index/acm-paths.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
{#each pinnedPaths as { title, slug, picture, color } (slug)}
<a class="path-item" target="_self" href={`/paths#${slug}`}>
<img src={picture} alt={`${slug}-logo`} />
<p class="size-md brand-dark headers">
acm<span class="brand-em" style={`--brand-color: ${color}`}>
<p class="size-md headers">
acm<span class="brand-em" style:--brand-color={color}>
{title}
</span>
</p>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/paths/path-section.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div>
<h2>
<span class="headers size-lg">
acm<span style={`--font-color: ${info.color}`}>
acm<span style:--font-color={info.color}>
<span class="brand-em">{info.title}</span>
</span>
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/utils/acm-toaster.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class:info={toastItem.type === ToastType.Info}
in:fly={{ y: 20 }}
out:fly={{ y: -20 }}
style={`--highlights: var(--acm-${toastItem.path}-rgb)`}
style:--highlights={`var(--acm-${toastItem.path}-rgb)`}
>
<img src="/assets/png/acm-shark.png" alt="acmCSUF Mascot: Frank the Shark" />
<p>{@html toastItem.content}</p>
Expand Down

1 comment on commit b783503

@vercel
Copy link

@vercel vercel bot commented on b783503 Mar 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.