Describe the bug
Currently, the column styles use simple percentage widths:
2 Columns: 50%
3 Columns: 33.333%
4 Columns: 25%
This works fine until you set a slide gap
Expected behavior
The slide widths should calculate with the gap
Actual behavior
Solution:
.rt-carousel {
&.is-style-columns-2 {
--rt-carousel-slide-width: calc(
(100% - (var(--rt-carousel-gap, 0px) * 1)) / 2
);
}
&.is-style-columns-3 {
--rt-carousel-slide-width: calc(
(100% - (var(--rt-carousel-gap, 0px) * 2)) / 3
);
}
&.is-style-columns-4 {
--rt-carousel-slide-width: calc(
(100% - (var(--rt-carousel-gap, 0px) * 3)) / 4
);
}
}
Steps to reproduce
n/a
Environment information
n/a
WordPress Environment
n/a
Contribution Guidelines
Describe the bug
Currently, the column styles use simple percentage widths:
2 Columns:50%3 Columns:33.333%4 Columns:25%This works fine until you set a slide gap
Expected behavior
The slide widths should calculate with the gap
Actual behavior
Solution:
Steps to reproduce
n/a
Environment information
n/a
WordPress Environment
n/a
Contribution Guidelines