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

@@ -118,7 +118,8 @@
</ul>
<span class="carousel__arrow" bind:this={arrowEl}
style="--x: {$arrowPosition.x}px; --y: {$arrowPosition.y}px;"
style:--x="{$arrowPosition.x}px"
style:--y="{$arrowPosition.y}px"
class:is-flipped={arrowDirection === 'prev' && !isFirstSlide || isLastSlide}
>
<svg width="29" height="32">