Enhance carousel styles with improved caption visibility and dot navigation design

This commit is contained in:
interlope committed 2026-05-30 04:28:26 +02:00
1 parent a98f09720f
commit 83ed19279c
1 file changed
+31 -24
+31 -24
View File
@@ -1253,16 +1253,12 @@ footer.footer-modern a:hover {
border-radius: var(--radius-md); border-radius: var(--radius-md);
overflow: hidden; overflow: hidden;
border: 1px solid var(--border-color); border: 1px solid var(--border-color);
background: var(--bg-subtle); background: #000;
}
.carousel-track {
position: relative;
} }
.carousel-slide { .carousel-slide {
display: none; display: none;
position: relative; /* anchor for caption overlay */ position: relative;
} }
.carousel-slide.is-active { .carousel-slide.is-active {
@@ -1276,32 +1272,39 @@ footer.footer-modern a:hover {
cursor: zoom-in; cursor: zoom-in;
} }
/* Caption overlays the bottom of the image — not a separate bar */ /* Caption: hidden by default, fades in on hover */
.carousel-caption { .carousel-caption {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
margin: 0; margin: 0;
padding: 0.35rem 1rem; padding: 0.3rem 1rem;
background: rgba(0, 0, 0, 0.52); background: rgba(0, 0, 0, 0.6);
color: #ffffff; color: rgba(255, 255, 255, 0.9);
font-size: var(--font-size-sm); font-size: 0.75rem;
text-align: center; text-align: center;
opacity: 0;
transition: opacity 0.2s ease;
} }
.carousel-slide:hover .carousel-caption {
opacity: 1;
}
/* Arrows */
.carousel-arrow { .carousel-arrow {
position: absolute; position: absolute;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
z-index: 10; z-index: 10;
background: rgba(0, 0, 0, 0.45); background: rgba(0, 0, 0, 0.4);
color: #ffffff; color: #ffffff;
border: none; border: none;
width: 38px; width: 36px;
height: 38px; height: 36px;
border-radius: 50%; border-radius: 50%;
font-size: 1.6rem; font-size: 1.5rem;
line-height: 1; line-height: 1;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -1314,22 +1317,26 @@ footer.footer-modern a:hover {
.carousel-prev { left: 10px; } .carousel-prev { left: 10px; }
.carousel-next { right: 10px; } .carousel-next { right: 10px; }
/* Dots sit in a slim strip below the image */ /* Dots: overlaid at the bottom of the image, no separate strip */
.carousel-dots { .carousel-dots {
position: absolute;
bottom: 10px;
left: 0;
right: 0;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
gap: 6px; gap: 6px;
padding: 7px 0; pointer-events: none;
background: var(--bg-subtle); z-index: 5;
} }
.carousel-dot { .carousel-dot {
width: 8px; pointer-events: auto;
height: 8px; width: 6px;
height: 6px;
border-radius: 50%; border-radius: 50%;
/* white semi-transparent — readable on every theme */ background: rgba(255, 255, 255, 0.45);
background: rgba(255, 255, 255, 0.35);
border: none; border: none;
padding: 0; padding: 0;
cursor: pointer; cursor: pointer;
@@ -1337,8 +1344,8 @@ footer.footer-modern a:hover {
} }
.carousel-dot.is-active { .carousel-dot.is-active {
background: var(--accent); background: #ffffff;
transform: scale(1.3); transform: scale(1.5);
} }
/* ======================================== /* ========================================