MediaWiki:Common.css: Difference between revisions

From 3DO World
Jump to navigation Jump to search
No edit summary
No edit summary
Tag: Reverted
Line 1: Line 1:
/* 1. Ensure the table expands to fit the content comfortably */
/* =========================
.mw-parser-output .wikitable {
  Pamphlet table + cover hover preview
    width: 100% !important; /* Forces the table to use the full page width */
  (scoped so it ONLY affects tables with class="pamphletTable")
    table-layout: auto !important; /* Allows columns to grow based on text size */
  ========================= */
    border-collapse: collapse !important;
 
/* Table layout */
.mw-parser-output table.pamphletTable {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}
 
/* Cell padding / spacing */
.mw-parser-output table.pamphletTable th,
.mw-parser-output table.pamphletTable td {
  padding: 10px 14px;      /* increase/decrease to taste */
  vertical-align: middle;
  text-align: left;
}
 
/* Header styling (optional but nice) */
.mw-parser-output table.pamphletTable th {
  font-weight: 600;
}
 
/* Cover column locked + centered */
.mw-parser-output table.pamphletTable th:first-child,
.mw-parser-output table.pamphletTable td:first-child {
  width: 80px;
  min-width: 80px;
  text-align: center;
  padding: 6px;            /* tighter padding for the image cell */
  overflow: visible;      /* important so hover-zoom can escape */
}
 
/* Keep the cover cell from wrapping oddly */
.mw-parser-output table.pamphletTable td:first-child {
  white-space: nowrap;
}
}


/* 2. Add consistent padding to ALL cells */
/* =========================
.mw-parser-output .wikitable td,
  CoverThumb thumbnail box (uniform)
.mw-parser-output .wikitable th {
  ========================= */
    padding: 12px 15px !important; /* Generous horizontal space */
 
    vertical-align: middle !important;
.mw-parser-output table.pamphletTable .coverThumb {
    text-align: left;
  position: relative;
  display: inline-block;
  z-index: 1;
}
}


/* 3. Lock the 'Cover' column width so it doesn't move */
.mw-parser-output table.pamphletTable .coverSmall {
.mw-parser-output .wikitable td:first-child,
  width: 60px;
.mw-parser-output .wikitable th:first-child {
  height: 80px;
    width: 80px !important;
  overflow: hidden;
    min-width: 80px !important;
  display: flex;
    text-align: center !important;
  align-items: center;
  justify-content: center;
}
 
/* Smooth hover */
.mw-parser-output table.pamphletTable .coverSmall img,
.mw-parser-output table.pamphletTable img.zoom-img {
  transition: transform 120ms ease;
  transform-origin: top left;
}
 
/* =========================
  Hover zoom (pop-out preview)
  - This assumes your template adds class=zoom-img to the <img>
  ========================= */
 
.mw-parser-output table.pamphletTable .coverThumb:hover img.zoom-img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
 
  /* final preview size is controlled by scale + translate */
  transform: translate(100px, -20px) scale(3);
 
  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);
}
}


/* 4. The Hover Zoom - Adjusting the 'pop out' distance */
/* If anything clips the preview, this usually fixes it */
.mw-parser-output .coverThumb:hover .coverSmall img {
.mw-parser-output table.pamphletTable td {
    position: absolute !important;
  overflow: visible;
    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);
}
}

Revision as of 10:21, 29 January 2026

/* =========================
   Pamphlet table + cover hover preview
   (scoped so it ONLY affects tables with class="pamphletTable")
   ========================= */

/* Table layout */
.mw-parser-output table.pamphletTable {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}

/* Cell padding / spacing */
.mw-parser-output table.pamphletTable th,
.mw-parser-output table.pamphletTable td {
  padding: 10px 14px;      /* increase/decrease to taste */
  vertical-align: middle;
  text-align: left;
}

/* Header styling (optional but nice) */
.mw-parser-output table.pamphletTable th {
  font-weight: 600;
}

/* Cover column locked + centered */
.mw-parser-output table.pamphletTable th:first-child,
.mw-parser-output table.pamphletTable td:first-child {
  width: 80px;
  min-width: 80px;
  text-align: center;
  padding: 6px;            /* tighter padding for the image cell */
  overflow: visible;       /* important so hover-zoom can escape */
}

/* Keep the cover cell from wrapping oddly */
.mw-parser-output table.pamphletTable td:first-child {
  white-space: nowrap;
}

/* =========================
   CoverThumb thumbnail box (uniform)
   ========================= */

.mw-parser-output table.pamphletTable .coverThumb {
  position: relative;
  display: inline-block;
  z-index: 1;
}

.mw-parser-output table.pamphletTable .coverSmall {
  width: 60px;
  height: 80px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Smooth hover */
.mw-parser-output table.pamphletTable .coverSmall img,
.mw-parser-output table.pamphletTable img.zoom-img {
  transition: transform 120ms ease;
  transform-origin: top left;
}

/* =========================
   Hover zoom (pop-out preview)
   - This assumes your template adds class=zoom-img to the <img>
   ========================= */

.mw-parser-output table.pamphletTable .coverThumb:hover img.zoom-img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;

  /* final preview size is controlled by scale + translate */
  transform: translate(100px, -20px) scale(3);

  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);
}

/* If anything clips the preview, this usually fixes it */
.mw-parser-output table.pamphletTable td {
  overflow: visible;
}