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. Add padding to all table cells so text doesn't hit the edges */
/* 1. Ensure the table expands to fit the content comfortably */
.mw-parser-output .wikitable {
    width: 100% !important; /* Forces the table to use the full page width */
    table-layout: auto !important; /* Allows columns to grow based on text size */
    border-collapse: collapse !important;
}
 
/* 2. Add consistent padding to ALL cells */
.mw-parser-output .wikitable td,
.mw-parser-output .wikitable td,
.mw-parser-output .wikitable th {
.mw-parser-output .wikitable th {
     padding: 8px 12px !important; /* Adds space on top/bottom and sides */
     padding: 12px 15px !important; /* Generous horizontal space */
     vertical-align: middle !important;
     vertical-align: middle !important;
    overflow: visible !important; /* Keeps the zoom working */
     text-align: left;
}
 
/* 2. Specific fix for the Cover column to ensure it doesn't squeeze others */
.mw-parser-output .wikitable td:first-child {
    width: 70px !important; /* Gives the thumbnail box a bit of a buffer */
     text-align: center;
}
 
/* 3. Your existing stable box code */
.mw-parser-output .coverSmall {
    display: block !important;
    width: 60px !important;
    height: 80px !important;
    margin: 0 auto;
    position: relative !important;
}
}


/* 4. The Image (Normal View) */
/* 3. Lock the 'Cover' column width so it doesn't move */
.mw-parser-output .coverSmall img {
.mw-parser-output .wikitable td:first-child,
     width: 60px !important;
.mw-parser-output .wikitable th:first-child {
     height: 80px !important;
     width: 80px !important;
     object-fit: cover !important;
     min-width: 80px !important;
    display: block !important;
     text-align: center !important;
}
}


/* 5. The Zoom (Hover) */
/* 4. The Hover Zoom - Adjusting the 'pop out' distance */
.mw-parser-output .coverThumb:hover .coverSmall img {
.mw-parser-output .coverThumb:hover .coverSmall img {
     position: absolute !important;
     position: absolute !important;
     top: 0;
     top: 0 !important;
     left: 0;
     left: 0 !important;
     width: 350px !important;  
     width: 400px !important; /* Slightly larger for better readability */
     height: auto !important;
     height: auto !important;
     max-width: none !important;
      
     object-fit: contain !important;
     /* Move it further right to clear the new wide margins */
     transform: translate(85px, -10px) !important; /* Increased move-right to clear new padding */
     transform: translate(100px, -20px) !important;
   
     z-index: 10000 !important;
     z-index: 10000 !important;
     pointer-events: none !important;
     pointer-events: none !important;

Revision as of 10:16, 29 January 2026

/* 1. Ensure the table expands to fit the content comfortably */
.mw-parser-output .wikitable {
    width: 100% !important; /* Forces the table to use the full page width */
    table-layout: auto !important; /* Allows columns to grow based on text size */
    border-collapse: collapse !important;
}

/* 2. Add consistent padding to ALL cells */
.mw-parser-output .wikitable td,
.mw-parser-output .wikitable th {
    padding: 12px 15px !important; /* Generous horizontal space */
    vertical-align: middle !important;
    text-align: left;
}

/* 3. Lock the 'Cover' column width so it doesn't move */
.mw-parser-output .wikitable td:first-child,
.mw-parser-output .wikitable th:first-child {
    width: 80px !important;
    min-width: 80px !important;
    text-align: center !important;
}

/* 4. The Hover Zoom - Adjusting the 'pop out' distance */
.mw-parser-output .coverThumb:hover .coverSmall img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 400px !important; /* Slightly larger for better readability */
    height: auto !important;
    
    /* Move it further right to clear the new wide margins */
    transform: translate(100px, -20px) !important;
    
    z-index: 10000 !important;
    pointer-events: none !important;
    background: #fff;
    border: 1px solid #888;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}