MediaWiki:Common.css: Difference between revisions

From AbhiprayaVedi
No edit summary
No edit summary
Line 1: Line 1:
/* 1. TITLE - FORCE CENTER (HIGHEST SPECIFICITY) */
/* ===== COMPLETE WORKING CSS FOR YOUR TEMPLATE ===== */
#mw-content-text .firstHeading {
 
  text-align: center !important;
/* 1. TITLE - FORCE CENTER ALIGNMENT */
h1#firstHeading,
.mw-body h1,
#mw-content-text .firstHeading,
.mw-parser-output .firstHeading {
   font-family: Georgia, serif !important;
   font-family: Georgia, serif !important;
   font-size: 2.2em !important;
   font-size: 2.2em !important;
   margin-bottom: 0.2em !important;
  text-align: center !important;
   margin-bottom: 0.1em !important;
   line-height: 1.1 !important;
   line-height: 1.1 !important;
}
}


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


Line 24: Line 37:
}
}


/* 3. FIRST PARAGRAPH - NO BLOCK */
.meta-sep {
#mw-content-text .article-content p {
   margin: 0 0.3em !important;
   margin-top: 0.1em !important;
  margin-bottom: 0.8em !important;
  text-indent: 0 !important;
}
}


#mw-content-text .article-content p:first-of-type {
/* 3. MAIN WRAPPER */
  margin-top: 0 !important;
}
 
/* 4. BASE LAYOUT */
.article-wrapper {
.article-wrapper {
   max-width: 900px;
   max-width: 900px;
Line 42: Line 48:
   font-family: Georgia, serif;
   font-family: Georgia, serif;
   line-height: 1.6;
   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 {
.article-content {
   font-size: 1.1em;
   font-size: 1.1em;
   clear: both;
  overflow: hidden;
   clear: both !important;
}
}


/* 5. FLOATBOX */
/* 5. FLOATBOX - THUMBNAIL + HIGHLIGHTS */
.article-floatbox {
.article-floatbox {
   float: right !important;
   float: right !important;
   width: 220px !important;
   width: 220px !important;
   margin: 0 0 1em 1.5em !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;
  }
}
}

Revision as of 19:57, 31 January 2026

/* ===== 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;
  }
}