MediaWiki:Common.css: Difference between revisions

From 3DO World
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; /* removes extra space */
    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.15s ease; /* optional fade */
    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: 0;
     top: -20px;                 /* nudge up/out of cell – adjust as needed */
     left: 0;
     left: 90px;                 /* pop right of the cell – tweak based on table */
     z-index: 10;
     z-index: 100;
     opacity: 0;
     opacity: 0;
     pointer-events: none; /* so hover stays on the container */
     pointer-events: none;
     transition: opacity 0.2s ease, transform 0.2s ease;
     transition: opacity 0.25s ease;
    transform: scale(1.05); /* slight pop if you want */
     background: #fff;
     background: #fff;
     border: 1px solid #aaa;
     border: 1px solid #999;
     box-shadow: 0 8px 24px rgba(0,0,0,0.5);
     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; /* hide small one */
     opacity: 0;
}
}


.mw-parser-output .cover-preview:hover .cover-large {
.mw-parser-output .cover-preview:hover .cover-large {
     opacity: 1;
     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 */
/* 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 */
}