MediaWiki:Common.css: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* | /* Base container */ | ||
.mw-parser-output .coverThumb { | .mw-parser-output .coverThumb { | ||
display: inline-block; | |||
position: relative; | |||
line-height: 0; /* helps avoid extra line spacing */ | |||
} | } | ||
/* | /* The image inside (with link or without) */ | ||
.mw-parser-output .coverThumb .mw-file-element { | .mw-parser-output .coverThumb img.mw-file-element { | ||
transition: transform 0.15s ease; | |||
transform-origin: top left; | |||
box-sizing: border-box; | |||
} | } | ||
/* | /* Hover — scale the image directly */ | ||
.mw-parser-output .coverThumb:hover { | .mw-parser-output .coverThumb:hover img.mw-file-element { | ||
transform: scale(3.5); /* adjust 3–4.5 depending on taste */ | |||
z-index: 9999; | |||
background: #fff; | |||
border: 1px solid #aaa; | |||
box-shadow: 0 8px 24px rgba(0,0,0,0.5); | |||
pointer-events: none; | |||
} | } | ||
.mw-parser-output .coverThumb:hover .mw-file-element { | /* Optional: if you want it centered-ish instead of top-left growth */ | ||
.mw-parser-output .coverThumb:hover img.mw-file-element { | |||
transform-origin: center center; | |||
transform: scale(3.5); | |||
} | } | ||
Revision as of 11:55, 29 January 2026
/* Base container */
.mw-parser-output .coverThumb {
display: inline-block;
position: relative;
line-height: 0; /* helps avoid extra line spacing */
}
/* The image inside (with link or without) */
.mw-parser-output .coverThumb img.mw-file-element {
transition: transform 0.15s ease;
transform-origin: top left;
box-sizing: border-box;
}
/* Hover — scale the image directly */
.mw-parser-output .coverThumb:hover img.mw-file-element {
transform: scale(3.5); /* adjust 3–4.5 depending on taste */
z-index: 9999;
background: #fff;
border: 1px solid #aaa;
box-shadow: 0 8px 24px rgba(0,0,0,0.5);
pointer-events: none;
}
/* Optional: if you want it centered-ish instead of top-left growth */
.mw-parser-output .coverThumb:hover img.mw-file-element {
transform-origin: center center;
transform: scale(3.5);
}