MediaWiki:Vector-dark.css: Difference between revisions
Appearance
Cdjensen94 (talk | contribs) No edit summary |
Cdjensen94 (talk | contribs) No edit summary |
||
Line 500: | Line 500: | ||
} | } | ||
/* | /* Slideshow element */ | ||
.mw-jsslideshow slideshow { | .mw-jsslideshow slideshow { | ||
width: 100%; | |||
display: flex; | display: flex; | ||
flex-wrap: nowrap; | flex-wrap: nowrap; | ||
overflow: hidden; /* No side scrolling */ | |||
} | } | ||
/* Each slide | /* Each slide */ | ||
.mw-jsslideshow slideshow div { | .mw-jsslideshow slideshow div { | ||
flex: 0 0 100%; /* Each slide takes full width */ | flex: 0 0 100%; /* Each slide takes full width */ | ||
display: flex; | display: flex; | ||
justify-content: center; | justify-content: center; | ||
align-items: center; | align-items: center; | ||
overflow: hidden; | overflow: hidden; /* In case there's weird padding */ | ||
} | } | ||
/* | /* Images (these are swapped in from [[File:]] when rendered) */ | ||
.mw-jsslideshow slideshow div img { | .mw-jsslideshow slideshow div img { | ||
width: 100%; | width: 100%; | ||
height: | height: auto; /* Natural height! */ | ||
display: block; | display: block; | ||
object-fit: contain; /* No cropping - show the whole image */ | |||
max-height: 90vh; /* Optional, so slides don’t get too tall on desktop */ | |||
} | } | ||
/* | /* Optional mobile-friendly tweaks */ | ||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.mw-jsslideshow slideshow { | .mw-jsslideshow slideshow div img { | ||
max-height: 70vh; /* Shorter slides on smaller screens */ | |||
} | } | ||
} | } |