MediaWiki:Common.css: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* 1. The Container | /* 1. Fix the Table Cell height so it never collapses */ | ||
.mw-parser-output .wikitable td { | |||
height: 80px !important; | |||
padding: 0 !important; | |||
vertical-align: middle !important; | |||
overflow: visible !important; | |||
} | |||
/* 2. The Container */ | |||
.mw-parser-output .coverSmall { | .mw-parser-output .coverSmall { | ||
display: block !important; | |||
display: | |||
width: 60px !important; | width: 60px !important; | ||
height: 80px !important; | height: 80px !important; | ||
margin: 0 auto; | |||
position: relative !important; | |||
} | } | ||
/* | /* 3. The Image (Normal View) */ | ||
.mw-parser-output . | .mw-parser-output .coverSmall img { | ||
width: 60px !important; | width: 60px !important; | ||
height: 80px !important; | height: 80px !important; | ||
object-fit: | /* This forces all images to fill the 60x80 box perfectly */ | ||
object-fit: cover !important; | |||
display: block !important; | |||
transition: transform 0.1s ease-in-out !important; | |||
} | } | ||
/* | /* 4. The Zoom (Hover) */ | ||
.mw-parser-output . | .mw-parser-output .coverThumb:hover .coverSmall img { | ||
position: absolute !important; | position: absolute !important; | ||
top: 0; | top: 0; | ||
left: 0; | left: 0; | ||
/* Zoomed Size */ | |||
width: 350px !important; | |||
/* | |||
width: 350px !important; | |||
height: auto !important; | height: auto !important; | ||
max-width: none !important; | max-width: none !important; | ||
transform: translate( | |||
/* Switch back to 'contain' so you see the FULL image when zoomed */ | |||
object-fit: contain !important; | |||
transform: translate(75px, -10px) !important; | |||
z-index: 10000 !important; | z-index: 10000 !important; | ||
pointer-events: none; | pointer-events: none !important; | ||
background: #fff; | background: #fff; | ||
border: 1px solid #888; | border: 1px solid #888; | ||
box-shadow: 0 10px 30px rgba(0,0,0,0.5); | box-shadow: 0 10px 30px rgba(0,0,0,0.5); | ||
} | } | ||
Revision as of 10:01, 29 January 2026
/* 1. Fix the Table Cell height so it never collapses */
.mw-parser-output .wikitable td {
height: 80px !important;
padding: 0 !important;
vertical-align: middle !important;
overflow: visible !important;
}
/* 2. The Container */
.mw-parser-output .coverSmall {
display: block !important;
width: 60px !important;
height: 80px !important;
margin: 0 auto;
position: relative !important;
}
/* 3. The Image (Normal View) */
.mw-parser-output .coverSmall img {
width: 60px !important;
height: 80px !important;
/* This forces all images to fill the 60x80 box perfectly */
object-fit: cover !important;
display: block !important;
transition: transform 0.1s ease-in-out !important;
}
/* 4. The Zoom (Hover) */
.mw-parser-output .coverThumb:hover .coverSmall img {
position: absolute !important;
top: 0;
left: 0;
/* Zoomed Size */
width: 350px !important;
height: auto !important;
max-width: none !important;
/* Switch back to 'contain' so you see the FULL image when zoomed */
object-fit: contain !important;
transform: translate(75px, -10px) !important;
z-index: 10000 !important;
pointer-events: none !important;
background: #fff;
border: 1px solid #888;
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}