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:
/* 1. Force all table cells in the 'Cover' column to stay 80px tall */
/* 1. The Container - Holds the relative position */
.wikitable td {
.mw-parser-output .coverSmall {
     height: 85px !important;
     position: relative !important;
     min-height: 85px !important;
     display: inline-block !important;
     max-height: 85px !important;
     width: 60px !important;
     overflow: visible !important;
     height: 80px !important;
     vertical-align: middle !important;
     vertical-align: middle;
    padding: 5px !important;
}
}


/* 2. The Container - This acts as the anchor */
/* 2. The Spacer - This image stays in the table flow to hold the row open */
.mw-parser-output .coverSmall {
.mw-parser-output .spacer-img {
    display: block !important;
     width: 60px !important;
     width: 60px !important;
     height: 80px !important;
     height: 80px !important;
     position: relative !important;  
     object-fit: contain !important;
     margin: 0 auto;
     visibility: visible;
}
}


/* 3. The Image (Normal View) */
/* 3. The Zoom Image - Hidden by default, sits on top of the spacer */
.mw-parser-output .coverSmall img {
.mw-parser-output .zoom-img {
    position: absolute !important;
    top: 0;
    left: 0;
     width: 60px !important;
     width: 60px !important;
     height: 80px !important;
     height: 80px !important;
     object-fit: contain !important; /* Shows full pamphlet shrunken down */
     opacity: 0; /* Hidden but clickable */
    display: block !important;
     transition: transform 0.1s ease-in-out !important;
     transition: none !important; /* Removing transition helps stop the flicker */
}
}


/* 4. The Magnified View (Hover) */
/* 4. The Hover State */
.mw-parser-output .coverThumb:hover .coverSmall img {
.mw-parser-output .coverThumb:hover .zoom-img {
     position: absolute !important;
     opacity: 1;
    top: -10px !important; /* Centers the zoom slightly better */
     width: 350px !important;
    left: 0 !important;
   
    /* Magnification Size */
     width: 350px !important;  
     height: auto !important;
     height: auto !important;
     max-width: none !important;
     max-width: none !important;
   
     transform: translate(70px, -20px) !important;
    /* Move it right so it doesn't hide the name */
     transform: translate(70px, 0) !important;
   
    /* Critical Fixes */
    pointer-events: none !important; /* Cursor 'ignores' the big image */
     z-index: 10000 !important;
     z-index: 10000 !important;
    pointer-events: none; /* Prevents flickering if mouse moves over the zoom */
      
      
     /* Aesthetics */
     /* Aesthetics */
     background: #fff !important;
     background: #fff;
     border: 1px solid #888 !important;
     border: 1px solid #888;
     box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
     box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
}


/* 5. Ensure the row stays on top while hovering */
/* 5. Keep the spacer visible during hover so the row doesn't collapse */
.wikitable tr:hover {
.mw-parser-output .coverThumb:hover .spacer-img {
     position: relative;
     visibility: visible !important;
    z-index: 999;
}
}

Revision as of 09:58, 29 January 2026

/* 1. The Container - Holds the relative position */
.mw-parser-output .coverSmall {
    position: relative !important;
    display: inline-block !important;
    width: 60px !important;
    height: 80px !important;
    vertical-align: middle;
}

/* 2. The Spacer - This image stays in the table flow to hold the row open */
.mw-parser-output .spacer-img {
    width: 60px !important;
    height: 80px !important;
    object-fit: contain !important;
    visibility: visible;
}

/* 3. The Zoom Image - Hidden by default, sits on top of the spacer */
.mw-parser-output .zoom-img {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 60px !important;
    height: 80px !important;
    opacity: 0; /* Hidden but clickable */
    transition: transform 0.1s ease-in-out !important;
}

/* 4. The Hover State */
.mw-parser-output .coverThumb:hover .zoom-img {
    opacity: 1;
    width: 350px !important;
    height: auto !important;
    max-width: none !important;
    transform: translate(70px, -20px) !important;
    z-index: 10000 !important;
    pointer-events: none; /* Prevents flickering if mouse moves over the zoom */
    
    /* Aesthetics */
    background: #fff;
    border: 1px solid #888;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* 5. Keep the spacer visible during hover so the row doesn't collapse */
.mw-parser-output .coverThumb:hover .spacer-img {
    visibility: visible !important;
}