Use Svelte shorthand for CSS variables declaration
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user