MediaWiki:Common.css: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
.mw-parser-output .cover-preview { | .mw-parser-output .cover-preview { | ||
position: relative; | position: relative; /* anchor for absolute child */ | ||
display: inline-block; | display: inline-block; /* shrinks to content (small img) */ | ||
line-height: 0; /* | width: 80px; /* match your thumbnail width */ | ||
height: auto; /* or set explicit height if all thumbs same aspect */ | |||
line-height: 0; /* kill extra vertical space */ | |||
vertical-align: middle; /* better table alignment */ | |||
} | } | ||
.mw-parser-output .cover-preview .cover-small { | .mw-parser-output .cover-preview .cover-small { | ||
transition: opacity 0. | width: 100%; /* fill container */ | ||
height: auto; | |||
display: block; /* remove any inline gaps */ | |||
transition: opacity 0.2s ease; | |||
} | } | ||
.mw-parser-output .cover-preview .cover-large { | .mw-parser-output .cover-preview .cover-large { | ||
position: absolute; | position: absolute; | ||
top: | top: -20px; /* nudge up/out of cell – adjust as needed */ | ||
left: | left: 90px; /* pop right of the cell – tweak based on table */ | ||
z-index: | z-index: 100; | ||
opacity: 0; | opacity: 0; | ||
pointer-events: none; | pointer-events: none; | ||
transition: opacity 0. | transition: opacity 0.25s ease; | ||
background: #fff; | background: #fff; | ||
border: 1px solid # | border: 1px solid #999; | ||
box-shadow: 0 | box-shadow: 0 10px 30px rgba(0,0,0,0.6); | ||
padding: 4px; /* optional white frame look */ | |||
} | } | ||
.mw-parser-output .cover-preview:hover .cover-small { | .mw-parser-output .cover-preview:hover .cover-small { | ||
opacity: 0; | opacity: 0; | ||
} | } | ||
.mw-parser-output .cover-preview:hover .cover-large { | .mw-parser-output .cover-preview:hover .cover-large { | ||
opacity: 1; | opacity: 1; | ||
} | } | ||
/* | /* Ensure table cell doesn't clip the popup */ | ||
.wikitable td:first-child { | .mw-parser-output .wikitable td:first-child, | ||
.mw-parser-output .wikitable th:first-child { | |||
overflow: visible !important; | overflow: visible !important; | ||
position: relative !important; | position: relative !important; /* helps with stacking context */ | ||
min-width: 100px; /* prevent squish – adjust */ | |||
} | } | ||
Revision as of 12:00, 29 January 2026
.mw-parser-output .cover-preview {
position: relative; /* anchor for absolute child */
display: inline-block; /* shrinks to content (small img) */
width: 80px; /* match your thumbnail width */
height: auto; /* or set explicit height if all thumbs same aspect */
line-height: 0; /* kill extra vertical space */
vertical-align: middle; /* better table alignment */
}
.mw-parser-output .cover-preview .cover-small {
width: 100%; /* fill container */
height: auto;
display: block; /* remove any inline gaps */
transition: opacity 0.2s ease;
}
.mw-parser-output .cover-preview .cover-large {
position: absolute;
top: -20px; /* nudge up/out of cell – adjust as needed */
left: 90px; /* pop right of the cell – tweak based on table */
z-index: 100;
opacity: 0;
pointer-events: none;
transition: opacity 0.25s ease;
background: #fff;
border: 1px solid #999;
box-shadow: 0 10px 30px rgba(0,0,0,0.6);
padding: 4px; /* optional white frame look */
}
.mw-parser-output .cover-preview:hover .cover-small {
opacity: 0;
}
.mw-parser-output .cover-preview:hover .cover-large {
opacity: 1;
}
/* Ensure table cell doesn't clip the popup */
.mw-parser-output .wikitable td:first-child,
.mw-parser-output .wikitable th:first-child {
overflow: visible !important;
position: relative !important; /* helps with stacking context */
min-width: 100px; /* prevent squish – adjust */
}