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. TABLE & ROW STABILITY */
/* 1) Padding: small space before/after text in ALL cells */
.mw-parser-output .wikitable td {
.mw-parser-output .wikitable td,
    height: 85px !important;
.mw-parser-output .wikitable th {
     padding: 10px 15px !important; /* 15px space from borders */
  padding: 8px 12px !important;    /* <- adjust left/right here */
    vertical-align: middle !important;
  vertical-align: middle !important;
    overflow: visible !important; /* CRITICAL: Allows the zoom to be seen */
}
}


/* 2. THE CONTAINER */
/* Optional: keep cover column a bit tighter */
.mw-parser-output .coverSmall {
.mw-parser-output .wikitable td:first-child,
    display: block !important;
.mw-parser-output .wikitable th:first-child {
    width: 60px !important;
  padding: 6px !important;
    height: 80px !important;
  text-align: center !important;
    margin: 0 auto;
  overflow: visible !important;     /* critical for hover to escape */
    position: relative !important;
  white-space: nowrap;
    overflow: visible !important; /* Prevents the scrollbar */
}
}


/* 3. THE SPACER (The first image) */
/* 2) Thumbnail consistency */
.mw-parser-output .coverSmall img.spacer-img {
.mw-parser-output .coverThumb {
    width: 60px !important;
  display: inline-block;
    height: 80px !important;
  position: relative;
    object-fit: contain !important;
  width: 60px;
    display: block !important;
  height: 80px;
  overflow: hidden;
}
}


/* 4. THE ZOOM (The second image - Hidden and Floating) */
/* Force the thumb image to fit the box */
.mw-parser-output .coverSmall img.zoom-img {
.mw-parser-output .coverThumb img {
    position: absolute !important; /* Removes it from the 'stack' to fix scrollbar */
  height: 80px !important;
    top: 0;
  width: auto !important;
    left: 0;
  display: block;
    width: 60px !important;
  margin: 0 auto;
    height: 80px !important;
  transition: transform 120ms ease;
    opacity: 0 !important; /* Invisible until hover */
  transform-origin: top left;
    pointer-events: none !important;
}
}


/* 5. THE HOVER TRIGGER */
/* 3) Hover preview: scale the SAME image and move it */
/* We trigger this when the mouse enters the main span */
.mw-parser-output .coverThumb:hover {
.mw-parser-output .coverThumb:hover .zoom-img {
  overflow: visible;               /* let it pop out */
    opacity: 1 !important;
  z-index: 10000;
    width: 350px !important;  
}
    height: auto !important;
 
    max-width: none !important;
.mw-parser-output .coverThumb:hover img {
   
  transform: translate(105px, -20px) scale(4) !important;
    /* Moves it right to clear the thumb and the 15px cell padding */
  background: #fff;
    transform: translate(105px, -20px) !important;
  border: 1px solid #888;
   
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 10000 !important;
  pointer-events: none;
    background: #fff;
    border: 1px solid #888;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
}

Revision as of 11:04, 29 January 2026

/* 1) Padding: small space before/after text in ALL cells */
.mw-parser-output .wikitable td,
.mw-parser-output .wikitable th {
  padding: 8px 12px !important;     /* <- adjust left/right here */
  vertical-align: middle !important;
}

/* Optional: keep cover column a bit tighter */
.mw-parser-output .wikitable td:first-child,
.mw-parser-output .wikitable th:first-child {
  padding: 6px !important;
  text-align: center !important;
  overflow: visible !important;     /* critical for hover to escape */
  white-space: nowrap;
}

/* 2) Thumbnail consistency */
.mw-parser-output .coverThumb {
  display: inline-block;
  position: relative;
  width: 60px;
  height: 80px;
  overflow: hidden;
}

/* Force the thumb image to fit the box */
.mw-parser-output .coverThumb img {
  height: 80px !important;
  width: auto !important;
  display: block;
  margin: 0 auto;
  transition: transform 120ms ease;
  transform-origin: top left;
}

/* 3) Hover preview: scale the SAME image and move it */
.mw-parser-output .coverThumb:hover {
  overflow: visible;               /* let it pop out */
  z-index: 10000;
}

.mw-parser-output .coverThumb:hover img {
  transform: translate(105px, -20px) scale(4) !important;
  background: #fff;
  border: 1px solid #888;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  pointer-events: none;
}