Jump to content

MediaWiki:Vector-dark.css: Difference between revisions

No edit summary
No edit summary
Line 488: Line 488:
         color: #FFFFFF; /* White text */
         color: #FFFFFF; /* White text */
     }
     }
    .vector-body .mw-jsslideshow {
/* Ensure mw-jsslideshow fits inside vector-body */
    background-color: #002B5C;
.vector-body .mw-jsslideshow {
        border: 2px solid #FF851B;
    background-color: #002B5C;
        border-radius: 8px;
    border: 2px solid #FF851B;
        margin: 10px;
    border-radius: 8px;
        padding: 10px;
    margin: 10px;
        aspect-ratio: 336 / 205;
    padding: 10px;
        color: #FFFFFF;
    color: #FFFFFF;
    width: 100%;
    width: 100%;
    max-width: 100%;
    max-width: 100%;
    height: auto;
    overflow: hidden;
    overflow: hidden;
    position: relative;  
    position: relative;
    }
    box-sizing: border-box;
}
/* Slideshow element */
/* Tame the dynamically-generated slideshow div */
.vector-body .mw-jsslideshow .slideshow {
.vector-body .mw-jsslideshow .slideshow {
    width: 100% !important;
    width: 100% !important; /* Kill the injected width */
    height: auto !important; /* Kill the injected height */
    display: flex !important;
    display: flex !important;
    aspect-ratio: 336 / 205 !important;
    flex-wrap: nowrap !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important; /* No side scrolling */
    overflow: hidden !important; /* No horizontal scroll */
    box-sizing: border-box;
}
}
/* Each slide */
/* Each dynamically generated slide (the divs inside slideshow) */
.mw-jsslideshow .slideshow div {
.vector-body .mw-jsslideshow .slideshow > div {
    aspect-ratio: 336 / 205;
    flex: 0 0 100%;
    width: 100% !important; /* Override any inline width */
    width: 100% !important;
    height: auto !important; /* Override any inline height */
    height: auto !important;
    max-height: 90vh !important; /* Optional max height for tall images */
    display: flex !important;
    display: flex !important;
    justify-content: center !important;
    justify-content: center !important;
    align-items: center !important;
    align-items: center !important;
    overflow: hidden !important;
    overflow: hidden;
    box-sizing: border-box;
}
}
.mw-jsslideshow .slideshow div img {
/* Images inside each slide */
.vector-body .mw-jsslideshow .slideshow > div img {
    width: 100% !important;
    width: 100% !important;
    height: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-fit: contain !important;
    max-height: 90vh !important; /* Keeps tall images in check */
    max-height: 90vh !important;
}
}
/* Optional mobile-friendly tweaks */
/* Optional mobile-friendly tweaks */
@media (max-width: 768px) {
@media (max-width: 768px) {
    .vector-body .mw-jsslideshow .slideshow div img {
    .vector-body .mw-jsslideshow .slideshow > div img {
        max-height: 70vh; /* Shorter slides on smaller screens */
        max-height: 70vh;
        aspect-ratio: 336 / 205;
    }
    }
}
}