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:
/* =========================
/* Base container */
  TABLE PADDING (ONLY)
  ========================= */
 
/* Small padding so text isn't touching edges */
.mw-parser-output .wikitable td,
.mw-parser-output .wikitable th {
  padding: 8px 12px !important;
  vertical-align: middle !important;
  text-align: left !important;
}
 
/* Allow the hover preview to escape the cover cell */
.mw-parser-output .wikitable td:first-child,
.mw-parser-output .wikitable th:first-child {
  overflow: visible !important;
  position: relative !important;
  text-align: center !important;
}
 
/* =========================
  HOVER PREVIEW (WORKING)
  Uses MediaWiki's default image class: .mw-file-element
  ========================= */
 
/* IMPORTANT: class name is lowercase: coverThumb */
.mw-parser-output .coverThumb {
.mw-parser-output .coverThumb {
  display: inline-block;
    display: inline-block;
  position: relative;
    position: relative;
  z-index: 1;
    line-height: 0;         /* helps avoid extra line spacing */
}
}


/* Smooth motion */
/* The image inside (with link or without) */
.mw-parser-output .coverThumb .mw-file-element {
.mw-parser-output .coverThumb img.mw-file-element {
  transition: transform 120ms ease;
    transition: transform 0.15s ease;
  transform-origin: top left;
    transform-origin: top left;
    box-sizing: border-box;
}
}


/* Pop-out on hover */
/* Hover — scale the image directly */
.mw-parser-output .coverThumb:hover {
.mw-parser-output .coverThumb:hover img.mw-file-element {
  z-index: 99999;
    transform: scale(3.5);    /* adjust 3–4.5 depending on taste */
    z-index: 9999;
    background: #fff;
    border: 1px solid #aaa;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    pointer-events: none;
}
}


.mw-parser-output .coverThumb:hover .mw-file-element {
/* Optional: if you want it centered-ish instead of top-left growth */
  transform: translate(105px, -20px) scale(4) !important;
.mw-parser-output .coverThumb:hover img.mw-file-element {
  background: #fff;
    transform-origin: center center;
  border: 1px solid #888;
    transform: scale(3.5);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  pointer-events: none;
}
}

Revision as of 11:55, 29 January 2026

/* Base container */
.mw-parser-output .coverThumb {
    display: inline-block;
    position: relative;
    line-height: 0;          /* helps avoid extra line spacing */
}

/* The image inside (with link or without) */
.mw-parser-output .coverThumb img.mw-file-element {
    transition: transform 0.15s ease;
    transform-origin: top left;
    box-sizing: border-box;
}

/* Hover — scale the image directly */
.mw-parser-output .coverThumb:hover img.mw-file-element {
    transform: scale(3.5);     /* adjust 3–4.5 depending on taste */
    z-index: 9999;
    background: #fff;
    border: 1px solid #aaa;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    pointer-events: none;
}

/* Optional: if you want it centered-ish instead of top-left growth */
.mw-parser-output .coverThumb:hover img.mw-file-element {
    transform-origin: center center;
    transform: scale(3.5);
}