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 . | .mw-parser-output .cover-preview { | ||
position: relative; | |||
display: inline-block; | display: inline-block; | ||
line-height: 0; /* removes extra space */ | |||
} | } | ||
.mw-parser-output . | .mw-parser-output .cover-preview .cover-small { | ||
transition: | transition: opacity 0.15s ease; /* optional fade */ | ||
} | } | ||
.mw-parser-output . | .mw-parser-output .cover-preview .cover-large { | ||
position: absolute; | |||
z-index: | top: 0; | ||
left: 0; | |||
z-index: 10; | |||
opacity: 0; | |||
pointer-events: none; /* so hover stays on the container */ | |||
transition: opacity 0.2s ease, transform 0.2s ease; | |||
transform: scale(1.05); /* slight pop if you want */ | |||
background: #fff; | background: #fff; | ||
border: 1px solid #aaa; | border: 1px solid #aaa; | ||
box-shadow: 0 8px 24px rgba(0,0,0,0.5); | box-shadow: 0 8px 24px rgba(0,0,0,0.5); | ||
} | |||
.mw-parser-output .cover-preview:hover .cover-small { | |||
opacity: 0; /* hide small one */ | |||
} | |||
.mw-parser-output .cover-preview:hover .cover-large { | |||
opacity: 1; | |||
transform: scale(1); /* reset if you added pop */ | |||
} | |||
/* Optional: shift position so it doesn't cover the table too much */ | |||
.mw-parser-output .cover-preview:hover .cover-large { | |||
left: 90px; /* nudge right so it pops out of cell */ | |||
top: -40px; /* nudge up a bit */ | |||
} | |||
/* Make sure the cell allows overflow */ | |||
.wikitable td:first-child { | |||
overflow: visible !important; | |||
position: relative !important; | |||
} | } | ||
Revision as of 11:59, 29 January 2026
.mw-parser-output .cover-preview {
position: relative;
display: inline-block;
line-height: 0; /* removes extra space */
}
.mw-parser-output .cover-preview .cover-small {
transition: opacity 0.15s ease; /* optional fade */
}
.mw-parser-output .cover-preview .cover-large {
position: absolute;
top: 0;
left: 0;
z-index: 10;
opacity: 0;
pointer-events: none; /* so hover stays on the container */
transition: opacity 0.2s ease, transform 0.2s ease;
transform: scale(1.05); /* slight pop if you want */
background: #fff;
border: 1px solid #aaa;
box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.mw-parser-output .cover-preview:hover .cover-small {
opacity: 0; /* hide small one */
}
.mw-parser-output .cover-preview:hover .cover-large {
opacity: 1;
transform: scale(1); /* reset if you added pop */
}
/* Optional: shift position so it doesn't cover the table too much */
.mw-parser-output .cover-preview:hover .cover-large {
left: 90px; /* nudge right so it pops out of cell */
top: -40px; /* nudge up a bit */
}
/* Make sure the cell allows overflow */
.wikitable td:first-child {
overflow: visible !important;
position: relative !important;
}