MediaWiki:Common.css
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* 1. Force the 300px image to shrink and FIT inside the 60x80 box */
.mw-parser-output .coverSmall img.zoom-img {
width: 100% !important; /* Makes it fill the width of the 60px box */
height: 100% !important; /* Makes it fill the height of the 80px box */
object-fit: contain; /* THE FIX: Shrinks the whole image to fit without cropping */
display: block;
transition: transform 0.2s ease-in-out !important;
}
/* 2. The Hover State - Magnification */
.coverThumb:hover .coverSmall {
overflow: visible;
}
.coverThumb:hover .coverSmall img.zoom-img {
position: absolute;
top: 0;
left: 0;
/* The size of the magnified preview */
width: 250px !important;
height: auto !important;
/* Keep the full image visible when zoomed too */
object-fit: contain !important;
/* Move it to the right */
transform: translate(70px, -20px) !important;
z-index: 10000 !important;
box-shadow: 0 5px 20px rgba(0,0,0,0.5);
border: 1px solid #888;
background: #fff;
max-width: none !important;
}