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 container to stay the right size */
.coverSmall {
display: block;
width: 60px !important;
height: 80px !important;
overflow: hidden; /* This acts as the "crop" */
position: relative;
border: 1px solid #ddd;
}
/* 2. Force the 300px image to "shrink" into the 60x80 box */
.mw-parser-output .coverSmall img.zoom-img {
width: 60px !important;
height: 80px !important;
object-fit: cover; /* Keeps aspect ratio neat without stretching */
display: block;
transition: transform 0.2s ease-in-out !important;
}
/* 3. The Hover State - Magnification */
.coverThumb:hover .coverSmall {
overflow: visible; /* Let the image break out of the 60x80 box */
}
.coverThumb:hover .coverSmall img.zoom-img {
position: absolute;
top: 0;
left: 0;
/* This defines the size of the "magnified" preview */
width: 250px !important;
height: auto !important;
/* Move it to the right so it doesn't cover the name column */
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;
}