From 33f3f2f8922be89dff2c5805c857bf89994ae4e3 Mon Sep 17 00:00:00 2001 From: Alessandro Date: Fri, 4 Oct 2024 15:40:21 +0000 Subject: [PATCH] chore: code formatting --- src/components/carousel/carousel.component.ts | 56 ++++++++++--------- src/components/carousel/carousel.styles.ts | 9 ++- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/src/components/carousel/carousel.component.ts b/src/components/carousel/carousel.component.ts index 778c081e..24db6f31 100644 --- a/src/components/carousel/carousel.component.ts +++ b/src/components/carousel/carousel.component.ts @@ -507,11 +507,11 @@ export default class SlCarousel extends ShoelaceElement { id="scroll-container" part="scroll-container" class="${classMap({ - carousel__slides: true, - 'carousel__slides--horizontal': this.orientation === 'horizontal', - 'carousel__slides--vertical': this.orientation === 'vertical', - 'carousel__slides--dragging': this.dragging - })}" + carousel__slides: true, + 'carousel__slides--horizontal': this.orientation === 'horizontal', + 'carousel__slides--vertical': this.orientation === 'vertical', + 'carousel__slides--dragging': this.dragging + })}" style="--slides-per-page: ${this.slidesPerPage};" aria-busy="${scrolling ? 'true' : 'false'}" aria-atomic="true" @@ -525,15 +525,15 @@ export default class SlCarousel extends ShoelaceElement { ${this.navigation - ? html` + ? html` ` - : ''} + : ''} ${this.pagination - ? html` - `; } diff --git a/src/components/carousel/carousel.styles.ts b/src/components/carousel/carousel.styles.ts index f5778eea..9cf1ade3 100644 --- a/src/components/carousel/carousel.styles.ts +++ b/src/components/carousel/carousel.styles.ts @@ -152,11 +152,10 @@ export default css` @supports (animation-timeline: view()) { .carousel__pagination-item { - animation: pagination-item-active linear; - animation-timeline: --carousel; - animation-range: - calc(var(--index) * calc(100% / var(--pages))) - calc((var(--index) + 1) * calc(100% / var(--pages) + 1px)); + animation: pagination-item-active linear; + animation-timeline: --carousel; + animation-range: calc(var(--index) * calc(100% / var(--pages))) + calc((var(--index) + 1) * calc(100% / var(--pages) + 1px)); } }