Use Svelte shorthand for CSS variables declaration

This commit is contained in:
2022-08-01 20:58:59 +02:00
parent e499f69574
commit c91166d548
6 changed files with 10 additions and 7 deletions

View File

@@ -61,7 +61,9 @@
</script>
<div class="location" bind:this={locationEl}
style="--offset-x: {$offset.x}px; --offset-y: {$offset.y}px; --rotate: {$offset.x * 0.125}deg"
style:--offset-x="{$offset.x}px"
style:--offset-y="{$offset.y}px"
style:--rotate="{$offset.x * 0.125}deg"
>
<a href="/{location.country.slug}/{location.slug}"
on:mousemove={handleMouseMove}