MediaWiki:Vector-dark.css: Difference between revisions
Appearance
Cdjensen94 (talk | contribs) No edit summary |
Cdjensen94 (talk | contribs) No edit summary |
||
Line 493: | Line 493: | ||
border-radius: 8px; | border-radius: 8px; | ||
padding: 10px; | padding: 10px; | ||
color: #FFFFFF; | color: #FFFFFF; | ||
width: 100%; | |||
max-width: 100%; | |||
overflow: hidden; | |||
position: relative; | |||
} | } | ||
/* | /* The actual slideshow element */ | ||
.mw-jsslideshow | .mw-jsslideshow slideshow { | ||
width: 100%; | display: flex; | ||
flex-direction: row; /* Horizontal layout by default */ | |||
object-fit: cover; | flex-wrap: nowrap; | ||
width: 100%; | |||
height: auto; | |||
aspect-ratio: 16 / 9; /* Standard slideshow aspect ratio */ | |||
} | |||
/* Each slide (the <div> wrappers inside <slideshow>) */ | |||
.mw-jsslideshow slideshow div { | |||
flex: 0 0 100%; /* Each slide takes full width */ | |||
height: auto; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
overflow: hidden; | |||
} | |||
/* The actual images - these get swapped in by MediaWiki */ | |||
.mw-jsslideshow slideshow div img { | |||
width: 100%; | |||
height: 100%; | |||
object-fit: cover; /* Ensures images don't stretch */ | |||
display: block; | display: block; | ||
} | } | ||
/* | /* Responsive aspect ratios */ | ||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.mw-jsslideshow { | .mw-jsslideshow slideshow { | ||
aspect-ratio: 4 / 3; | aspect-ratio: 4 / 3; /* More square on tablets */ | ||
} | } | ||
} | } | ||
@media (max-width: 480px) { | @media (max-width: 480px) { | ||
.mw-jsslideshow { | .mw-jsslideshow slideshow { | ||
aspect-ratio: 1 / 1; | aspect-ratio: 1 / 1; /* Square for mobile */ | ||
} | } | ||
} | } | ||
/* ===== Table of Contents (TOC) ===== */ | /* ===== Table of Contents (TOC) ===== */ |