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 {
/* Tighten vertical space in cover cells only */
     position: relative;          /* anchor for absolute child */
.mw-parser-output .wikitable td:first-child {
    display: inline-block;      /* shrinks to content (small img) */
     padding-top: 4px !important;    /* was probably 8–12px or more */
    width: 80px;                 /* match your thumbnail width */
     padding-bottom: 4px !important;
     height: auto;                /* or set explicit height if all thumbs same aspect */
     vertical-align: middle !important; /* keeps image centered vertically */
     line-height: 0;             /* kill extra vertical space */
     vertical-align: middle;     /* better table alignment */
}
}


.mw-parser-output .cover-preview .cover-small {
/* Ensure the preview container hugs the image tightly */
     width: 100%;                 /* fill container */
.mw-parser-output .cover-preview {
    position: relative;
    display: inline-block;
     width: 80px;                     /* your thumb width */
     height: auto;
     height: auto;
     display: block;             /* remove any inline gaps */
     line-height: 1;                 /* crucial: kills extra line spacing */
     transition: opacity 0.2s ease;
     margin: 0;                       /* no extra margins */
}
}


.mw-parser-output .cover-preview .cover-large {
/* Force the small image to have no extra space around it */
     position: absolute;
.mw-parser-output .cover-preview .cover-small {
     top: -20px;                  /* nudge up/out of cell – adjust as needed */
     display: block;
     left: 90px;                  /* pop right of the cell – tweak based on table */
     margin: 0 auto;                  /* centers if needed */
    z-index: 100;
     line-height: 1;
    opacity: 0;
     vertical-align: middle;
     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 {
/* Optional: if rows are still tall due to text in other columns, constrain overall row */
     opacity: 1;
.mw-parser-output .wikitable tr {
     line-height: 1.2;                /* default is often 1.5–1.6; lower it slightly */
}
}


/* Ensure table cell doesn't clip the popup */
/* If needed: target the whole cover column for even tighter padding */
.mw-parser-output .wikitable td:first-child,
.mw-parser-output .wikitable td:first-child .cover-preview img {
.mw-parser-output .wikitable th:first-child {
     margin: 0 !important;
     overflow: visible !important;
     padding: 0 !important;
     position: relative !important; /* helps with stacking context */
    min-width: 100px;              /* prevent squish – adjust */
}
}

Revision as of 12:03, 29 January 2026

/* Tighten vertical space in cover cells only */
.mw-parser-output .wikitable td:first-child {
    padding-top: 4px !important;     /* was probably 8–12px or more */
    padding-bottom: 4px !important;
    vertical-align: middle !important;  /* keeps image centered vertically */
}

/* Ensure the preview container hugs the image tightly */
.mw-parser-output .cover-preview {
    position: relative;
    display: inline-block;
    width: 80px;                     /* your thumb width */
    height: auto;
    line-height: 1;                  /* crucial: kills extra line spacing */
    margin: 0;                       /* no extra margins */
}

/* Force the small image to have no extra space around it */
.mw-parser-output .cover-preview .cover-small {
    display: block;
    margin: 0 auto;                  /* centers if needed */
    line-height: 1;
    vertical-align: middle;
}

/* Optional: if rows are still tall due to text in other columns, constrain overall row */
.mw-parser-output .wikitable tr {
    line-height: 1.2;                /* default is often 1.5–1.6; lower it slightly */
}

/* If needed: target the whole cover column for even tighter padding */
.mw-parser-output .wikitable td:first-child .cover-preview img {
    margin: 0 !important;
    padding: 0 !important;
}