MediaWiki:Common.css: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* 1. | /* 1. The Container - Holds the relative position */ | ||
. | .mw-parser-output .coverSmall { | ||
position: relative !important; | |||
display: inline-block !important; | |||
width: 60px !important; | |||
height: 80px !important; | |||
vertical-align: middle | vertical-align: middle; | ||
} | } | ||
/* 2. The | /* 2. The Spacer - This image stays in the table flow to hold the row open */ | ||
.mw-parser-output . | .mw-parser-output .spacer-img { | ||
width: 60px !important; | width: 60px !important; | ||
height: 80px !important; | height: 80px !important; | ||
object-fit: contain !important; | |||
visibility: visible; | |||
} | } | ||
/* 3. The Image | /* 3. The Zoom Image - Hidden by default, sits on top of the spacer */ | ||
.mw-parser-output . | .mw-parser-output .zoom-img { | ||
position: absolute !important; | |||
top: 0; | |||
left: 0; | |||
width: 60px !important; | width: 60px !important; | ||
height: 80px !important; | height: 80px !important; | ||
opacity: 0; /* Hidden but clickable */ | |||
transition: transform 0.1s ease-in-out !important; | |||
transition: | |||
} | } | ||
/* 4. The | /* 4. The Hover State */ | ||
.mw-parser-output .coverThumb:hover . | .mw-parser-output .coverThumb:hover .zoom-img { | ||
opacity: 1; | |||
width: 350px !important; | |||
width: 350px !important; | |||
height: auto !important; | height: auto !important; | ||
max-width: none !important; | max-width: none !important; | ||
transform: translate(70px, -20px) !important; | |||
transform: translate(70px, | |||
z-index: 10000 !important; | z-index: 10000 !important; | ||
pointer-events: none; /* Prevents flickering if mouse moves over the zoom */ | |||
/* Aesthetics */ | /* Aesthetics */ | ||
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); | ||
} | } | ||
/* 5. | /* 5. Keep the spacer visible during hover so the row doesn't collapse */ | ||
. | .mw-parser-output .coverThumb:hover .spacer-img { | ||
visibility: visible !important; | |||
} | } | ||
Revision as of 09:58, 29 January 2026
/* 1. The Container - Holds the relative position */
.mw-parser-output .coverSmall {
position: relative !important;
display: inline-block !important;
width: 60px !important;
height: 80px !important;
vertical-align: middle;
}
/* 2. The Spacer - This image stays in the table flow to hold the row open */
.mw-parser-output .spacer-img {
width: 60px !important;
height: 80px !important;
object-fit: contain !important;
visibility: visible;
}
/* 3. The Zoom Image - Hidden by default, sits on top of the spacer */
.mw-parser-output .zoom-img {
position: absolute !important;
top: 0;
left: 0;
width: 60px !important;
height: 80px !important;
opacity: 0; /* Hidden but clickable */
transition: transform 0.1s ease-in-out !important;
}
/* 4. The Hover State */
.mw-parser-output .coverThumb:hover .zoom-img {
opacity: 1;
width: 350px !important;
height: auto !important;
max-width: none !important;
transform: translate(70px, -20px) !important;
z-index: 10000 !important;
pointer-events: none; /* Prevents flickering if mouse moves over the zoom */
/* Aesthetics */
background: #fff;
border: 1px solid #888;
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
/* 5. Keep the spacer visible during hover so the row doesn't collapse */
.mw-parser-output .coverThumb:hover .spacer-img {
visibility: visible !important;
}