MediaWiki:Common.css: Difference between revisions
Jump to navigation
Jump to search
No edit summary Tag: Manual revert |
No edit summary |
||
| Line 1: | Line 1: | ||
/* 1. | /* 1. Table Layout & Spacing */ | ||
.mw-parser-output .wikitable { | .mw-parser-output .wikitable { | ||
width: 100% !important; | width: 100% !important; | ||
table-layout: auto !important; | table-layout: auto !important; | ||
border-collapse: collapse !important; | border-collapse: collapse !important; | ||
} | } | ||
.mw-parser-output .wikitable td, | .mw-parser-output .wikitable td, | ||
.mw-parser-output .wikitable th { | .mw-parser-output .wikitable th { | ||
padding: 12px 15px !important; /* | padding: 12px 15px !important; /* This fixes the text hitting the edges */ | ||
vertical-align: middle !important; | vertical-align: middle !important; | ||
overflow: visible !important; | |||
} | } | ||
/* | /* 2. Lock the 'Cover' column width */ | ||
.mw-parser-output .wikitable td | .mw-parser-output .wikitable td:first-child { | ||
width: 80px !important; | width: 80px !important; | ||
min-width: 80px !important; | min-width: 80px !important; | ||
| Line 22: | Line 20: | ||
} | } | ||
/* 4. The Hover Zoom - | /* 3. The Container Box */ | ||
.mw-parser-output .coverThumb:hover .coverSmall img { | .mw-parser-output .coverSmall { | ||
display: block !important; | |||
width: 60px !important; | |||
height: 80px !important; | |||
margin: 0 auto; | |||
position: relative !important; | |||
overflow: hidden !important; /* This crops the 300px image until hover */ | |||
} | |||
/* 4. THE FIX: Force the 300px image to shrink in Normal View */ | |||
.mw-parser-output .coverSmall img.zoom-img { | |||
width: 60px !important; | |||
height: 80px !important; | |||
object-fit: contain !important; /* Fits the whole pamphlet in the box */ | |||
display: block !important; | |||
position: static !important; | |||
} | |||
/* 5. The Hover Zoom */ | |||
.mw-parser-output .coverThumb:hover .coverSmall { | |||
overflow: visible !important; /* Allows the image to break out */ | |||
} | |||
.mw-parser-output .coverThumb:hover .coverSmall img.zoom-img { | |||
position: absolute !important; | position: absolute !important; | ||
top: 0 !important; | top: 0 !important; | ||
left: 0 !important; | left: 0 !important; | ||
width: 400px !important; /* | width: 400px !important; /* Magnified size */ | ||
height: auto !important; | height: auto !important; | ||
max-width: none !important; | |||
/* | /* Pulls it out and to the right */ | ||
transform: translate(100px, -20px) !important; | transform: translate(100px, -20px) !important; | ||
z-index: 10000 !important; | z-index: 10000 !important; | ||
pointer-events: none !important; | pointer-events: none !important; /* Flicker protection */ | ||
background: #fff; | background: #fff; | ||
border: 1px solid #888; | border: 1px solid #888; | ||
box-shadow: 0 10px 30px rgba(0,0,0,0.5); | box-shadow: 0 10px 30px rgba(0,0,0,0.5); | ||
} | } | ||
Revision as of 10:29, 29 January 2026
/* 1. Table Layout & Spacing */
.mw-parser-output .wikitable {
width: 100% !important;
table-layout: auto !important;
border-collapse: collapse !important;
}
.mw-parser-output .wikitable td,
.mw-parser-output .wikitable th {
padding: 12px 15px !important; /* This fixes the text hitting the edges */
vertical-align: middle !important;
overflow: visible !important;
}
/* 2. Lock the 'Cover' column width */
.mw-parser-output .wikitable td:first-child {
width: 80px !important;
min-width: 80px !important;
text-align: center !important;
}
/* 3. The Container Box */
.mw-parser-output .coverSmall {
display: block !important;
width: 60px !important;
height: 80px !important;
margin: 0 auto;
position: relative !important;
overflow: hidden !important; /* This crops the 300px image until hover */
}
/* 4. THE FIX: Force the 300px image to shrink in Normal View */
.mw-parser-output .coverSmall img.zoom-img {
width: 60px !important;
height: 80px !important;
object-fit: contain !important; /* Fits the whole pamphlet in the box */
display: block !important;
position: static !important;
}
/* 5. The Hover Zoom */
.mw-parser-output .coverThumb:hover .coverSmall {
overflow: visible !important; /* Allows the image to break out */
}
.mw-parser-output .coverThumb:hover .coverSmall img.zoom-img {
position: absolute !important;
top: 0 !important;
left: 0 !important;
width: 400px !important; /* Magnified size */
height: auto !important;
max-width: none !important;
/* Pulls it out and to the right */
transform: translate(100px, -20px) !important;
z-index: 10000 !important;
pointer-events: none !important; /* Flicker protection */
background: #fff;
border: 1px solid #888;
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}