Avoid horizontal scroll due to slick’s right margin
I can use overflow for that in most sizes, but on mobile the buttons are outside the overflow and are not visible, thus have to revert it and then remove the right margin to avoid the extra space. Since on mobile we only show a single slide at a time, the lack of margin is not noticeable.
This commit is contained in:
parent
de03443c25
commit
244cbeddac
|
@ -615,6 +615,7 @@ dl, .nature > div, .outside_activities > div, .campsite_info {
|
|||
|
||||
.carousel {
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.carousel .spiel {
|
||||
|
@ -626,7 +627,7 @@ dl, .nature > div, .outside_activities > div, .campsite_info {
|
|||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.carousel .spiel, .carousel figure, .carousel .slick-track > img {
|
||||
.carousel .slick-slide {
|
||||
margin-right: 5rem;
|
||||
position: relative;
|
||||
}
|
||||
|
@ -671,6 +672,9 @@ dl, .nature > div, .outside_activities > div, .campsite_info {
|
|||
|
||||
|
||||
@media (max-width: 48rem) {
|
||||
.carousel {
|
||||
overflow: unset;
|
||||
}
|
||||
|
||||
.carousel .slick-arrow {
|
||||
background: var(--accent);
|
||||
|
@ -681,6 +685,11 @@ dl, .nature > div, .outside_activities > div, .campsite_info {
|
|||
.carousel .slick-list {
|
||||
padding-top: 2rem;
|
||||
}
|
||||
|
||||
.carousel .slick-list,
|
||||
.carousel .slick-slide {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.slick-slider .slick-prev {
|
||||
|
|
Loading…
Reference in New Issue