We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7012e61 commit b5d0dadCopy full SHA for b5d0dad
src/block/carousel/frontend-carousel.js
@@ -118,10 +118,9 @@ class _StackableCarousel {
118
} else if ( step === 2 ) {
119
const numSlides = this.slideEls.length
120
const slideClientRect = this.slideEls[ 0 ].getBoundingClientRect()
121
- const carouselSlideGap = window.getComputedStyle( this.el ).getPropertyValue( '--gap' )
122
const slideWidth = slideClientRect.width
123
124
- this.slideTranslateX = `calc((${ slideWidth }px * ${ numSlides }) + (${ carouselSlideGap } * ${ numSlides }))`
+ this.slideTranslateX = `calc((${ slideWidth }px * ${ numSlides }) + (var(--gap) * ${ numSlides }))`
125
126
step++
127
} else if ( step === 3 ) {
0 commit comments