Move carousel arrows inside the carousel, in the top-right

I misunderstood Oriol, and what he really wanted was to have the arrows
on top of the image, not just move the arrows from below to above. Thus,
I no longer need the carrousel to be a flex because the buttons are now
absolutely position (slick.css already sets the container to relative
position).

These arrows need to be visually inside a single container, to have a
white background, but Slick adds the two arrows separately.  I had to
move them close together, remove the radius from the “common edge”, and
use padding to “move” the arrows, rather than translation, in order to
avoid showing a gap.
This commit is contained in:
jordi fita mas 2024-01-17 17:51:02 +01:00
parent 962996be0b
commit 25308a3359
1 changed files with 14 additions and 19 deletions

View File

@ -587,43 +587,38 @@ dl, .nature > div, .outside_activities > div {
margin-right: -5rem;
}
.slick-slider.slick-initialized {
display: flex;
flex-wrap: wrap;
justify-content: end;
}
.slick-slider .slick-arrow {
font-size: 6rem;
font-size: 4rem;
line-height: 1;
width: 5rem;
height: 5rem;
border: none !important;
background: none;
background: var(--base);
cursor: pointer;
transition: transform 0.5s ease;
}
.slick-slider .slick-prev.slick-arrow, .slick-slider .slick-next.slick-arrow {
opacity: 1;
transition: padding 0.5s ease;
position: absolute;
top: 1rem;
z-index: 1;
}
.slick-slider .slick-prev {
order: -2;
margin: 0 4rem 2.5rem 0;
right: 6rem;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.slick-slider .slick-prev:hover {
transform: translateX(-1.3rem);
padding-right: 1.3rem;
}
.slick-slider .slick-next {
order: -1;
margin: 0 7rem 2.5rem 0;
right: 1rem;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.slick-slider .slick-next:hover {
transform: translateX(1.3rem);
padding-left: 1.3rem;
}
.enjoy {