MediaWiki:Common.css

From AbhiprayaVedi
Revision as of 13:23, 1 February 2026 by VijayanPN (talk | contribs)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* ===== COMPLETE WORKING CSS FOR YOUR TEMPLATE ===== */

/* 1. TITLE - FORCE CENTER ALIGNMENT */
h1#firstHeading,
.mw-body h1,
#mw-content-text .firstHeading,
.mw-parser-output .firstHeading {
  font-family: Georgia, serif !important;
  font-size: 2.2em !important;
  text-align: center !important;
  margin-bottom: 0.1em !important;
  line-height: 1.1 !important;
}

/* 2. META - SINGLE LINE, MINIMAL SPACE */
#mw-content-text .article-meta,
.mw-parser-output .article-meta {
  text-align: center !important;
  margin: 0.2em 0 0.6em 0 !important;
  font-size: 1.1em !important;
  font-weight: bold !important;
  color: #444 !important;
  line-height: 1.1 !important;
  padding: 0 !important;
}

#mw-content-text .article-meta p {
  display: inline !important;
  margin: 0 !important;
}

#mw-content-text .meta-line {
  display: inline-flex !important;
  align-items: baseline !important;
  white-space: nowrap !important;
  gap: 0.5em !important;
}

.meta-sep {
  margin: 0 0.3em !important;
}

/* 3. MAIN WRAPPER */
.article-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 15px;
  font-family: Georgia, serif;
  line-height: 1.6;
  background: #fdfcfc;
}

.article-header {
  margin-bottom: 0.3em !important;
}

/* 4. CONTENT - NO BLOCK SPACING */
#mw-content-text .article-content p,
.mw-parser-output .article-content p,
.article-content p {
  text-indent: 0 !important;
  margin: 0.2em 0 0.8em 0 !important;
  padding: 0 !important;
}

#mw-content-text .article-content > p:first-of-type,
.mw-parser-output .article-content > p:first-of-type,
.article-content > p:first-of-type,
.article-content p:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.article-content {
  font-size: 1.1em;
  overflow: hidden;
  clear: both !important;
}

/* 5. FLOATBOX - THUMBNAIL + HIGHLIGHTS */
.article-floatbox {
  float: right !important;
  width: 220px !important;
  margin: 0 0 1em 1.5em !important;
  background: #f8f9fa;
  padding: 12px;
  border-left: 4px solid #dee2e6;
  overflow: hidden;
}

.article-floatbox h3 {
  margin: 0 0 8px 0 !important;
  font-size: 0.95em !important;
}

/* HIGHLIGHTS BELOW THUMBNAIL */
.article-highlights {
  margin-top: 12px !important;
  float: none !important;
  width: 100% !important;
  clear: both;
}

.article-highlights ul {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.article-highlights li {
  margin-bottom: 10px !important;
  padding-bottom: 6px !important;
  border-bottom: 1px solid #dee2e6 !important;
  font-size: 0.9em;
}

.article-highlights li:last-child {
  margin-bottom: 0 !important;
  border-bottom: none !important;
}

/* 6. INTRO */
.article-intro {
  font-size: 1.2em;
  background: #f8f9fa;
  padding: 16px;
  border-left: 5px solid #adb5bd;
  margin-bottom: 18px;
}

/* 7. AUTHOR BIO & SOURCE */
.article-author-bio {
  margin-top: 30px;
  font-size: 0.9em;
  font-style: normal !important;
  background: #f1f3f4;
  padding: 15px;
  border-radius: 6px;
  border-top: 2px solid #dee2e6;
}

.article-source {
  margin-top: 25px;
  font-size: 0.9em;
  border-top: 1px solid #dee2e6;
  padding-top: 15px;
}

/* 8. MOBILE RESPONSIVE */
@media (max-width: 768px) {
  .article-wrapper {
    max-width: 100%;
    padding: 10px;
  }
  .article-floatbox {
    float: none !important;
    width: 100% !important;
    margin: 10px 0 !important;
  }
}
/* 1. SHRINK SPACE ABOVE META */
.article-header {
  margin-bottom: 0.1em !important;
  padding-bottom: 0 !important;
}

#mw-content-text > .article-wrapper > .article-header {
  margin-top: 0 !important;
}

/* 2. CONTENT STARTS ABOVE Floatbox */
.article-floatbox {
  margin-top: -10px !important; /* Pull up beside content */
}

/* 3. TEXT FLOWS AROUND Image1 */
#mw-content-text .article-content {
  overflow: visible !important;
}

/* Image1 float wrap */
.thumb {
  clear: none !important;
  margin: 0.3em 0.5em 0.3em 0 !important;
}
/* ADD TO END OF YOUR CURRENT CSS - Timeless specific */

/* 1. NO SPACE ABOVE META */
#mw-content-text .article-header {
  margin-top: 0 !important;
  margin-bottom: 0.3em !important;
}

/* 2. CONTENT STARTS BEFORE Floatbox */
.article-floatbox {
  margin-top: 0 !important;
  position: relative;
  top: -5px;
}

/* 3. TEXT WRAPS AROUND Image1 */
.article-content {
  overflow: visible !important;
}

.thumb {
  float: left !important;
  margin: 0.2em 0.8em 0.5em 0 !important;
  clear: none !important;
}

.article-content p {
  margin-top: 0.1em !important;
}
/* ===== TIMELESS SKIN SPECIFIC FIXES ===== */

/* 1. ZERO SPACE: Title → Meta */
#mw-content-text > .firstHeading + .article-wrapper .article-header,
.timeless #firstHeading + div .article-header {
  margin-top: 0 !important;
  padding-top: 0 !important;
  margin-bottom: 0.2em !important;
}

/* 2. CONTENT STARTS LEFT OF Floatbox (Fill blank space) */
#mw-content-text .article-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Floatbox overlaps content start */
.timeless .article-floatbox {
  margin-top: -15px !important;
  position: relative;
  z-index: 2;
}

/* 3. TEXT FLOWS AROUND Image1 (No First Para Block) */
.thumb {
  float: left !important;
  margin: 0.1em 1em 0.5em 0 !important;
  clear: none !important;
}

.article-content p {
  margin-top: 0.1em !important;
}

.article-content p:first-of-type {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Timeless content wrapper override */
#mw-content-block .article-content p:first-child {
  margin-top: 0 !important;
}