From 50793e261167585b5dae3151c03fb28acdb02994 Mon Sep 17 00:00:00 2001 From: Vova Yatsyuk Date: Tue, 7 Nov 2023 16:57:16 +0200 Subject: [PATCH] Prevent layout shift when using swiper --- Block/Widgets/Slider.php | 1 - view/frontend/web/css/testimonials.less | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Block/Widgets/Slider.php b/Block/Widgets/Slider.php index 88dc6fb..7910ddc 100644 --- a/Block/Widgets/Slider.php +++ b/Block/Widgets/Slider.php @@ -122,7 +122,6 @@ public function getSwiperConfig() "slidesToScroll" => 1, "freeMode" => false, "loop" => true, - "spaceBetween" => 10, 'navigation' => [ 'nextEl' => '.swiper-button-next', 'prevEl' => '.swiper-button-prev' diff --git a/view/frontend/web/css/testimonials.less b/view/frontend/web/css/testimonials.less index bfd4eb1..8b8f491 100644 --- a/view/frontend/web/css/testimonials.less +++ b/view/frontend/web/css/testimonials.less @@ -312,7 +312,7 @@ figure.testimonial { box-sizing: border-box; - margin: 0; + margin: 0 10px 0 0; padding: 40px 20px 0; height: 100%;