MediaWiki:Common.css: Difference between revisions

From AbhiprayaVedi
No edit summary
No edit summary
Line 50: Line 50:
}
}


/* 1. Hide empty content-body in template preview - ELIMINATES visible block */
.article-content {
.content-body:empty {
   font-size: 1.1em;
   display: none !important;
  min-height: 0 !important;
}
}


/* 2. Ensure first real content has zero top margin - SEAMLESS flow */
.content-body {
.content-body > *:first-child {
   line-height: 1.7;
   margin-top: 0 !important;
  padding-top: 0 !important;
}
}


/* Hide empty content-body */
.content-body:empty {
  display: none !important;
}


.article-content {
/* Meta line flex (MISSING RULE) */
   font-size: 1.1em;
.meta-line {
   display: inline-flex !important;
  align-items: center;
  gap: 1em;
}
}


.content-body {
/* NUCLEAR PARAGRAPH RESET */
   line-height: 1.7;
.content-body * {
   margin-top: 0 !important;
  margin-bottom: 0.8em !important;
}
}


/* Reset ALL paragraph margins/indent globally for content-body */
.content-body p {
.content-body p,
.content-body div p {
   text-indent: 0 !important;
   text-indent: 0 !important;
   margin: 0.8em 0 !important;
   margin-bottom: 0.8em !important;
  padding: 0 !important;
}
}


/* First paragraph/content - zero top spacing */
.content-body > *:first-child,
.content-body > p:first-of-type,
.content-body p:first-of-type {
.content-body > *:first-child p {
   margin-top: 0 !important;
   margin-top: 0 !important;
}
}

Revision as of 11:31, 31 January 2026

.firstHeading {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4em;
  text-align: center;
  margin-bottom: 10px;
}

.article-wrapper {
  max-width: 900px;
  margin: auto;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.7;
}

.article-meta {
  text-align: center;
  margin-bottom: 10px;
  font-size: 1.25em;
  font-weight: bold;
  color: #444;
}
.article-meta p {
  display: inline !important;
  margin: 0 !important;
}
.meta-sep {
  margin: 0 1em;
}


.article-intro {
  font-size: 1.2em;
  background: #f2f2f2;
  padding: 14px;
  border-left: 5px solid #bbb;
  margin-bottom: 18px;
}

.article-floatbox {
  float: right;
  width: 220px;
  margin: 0 0 15px 20px;
  background: #fafafa;
  padding: 10px;
  border-left: 4px solid #ccc;
}

.article-floatbox h3 {
  margin-top: 0;
}

.article-content {
  font-size: 1.1em;
}

.content-body {
  line-height: 1.7;
}

/* Hide empty content-body */
.content-body:empty {
  display: none !important;
}

/* Meta line flex (MISSING RULE) */
.meta-line {
  display: inline-flex !important;
  align-items: center;
  gap: 1em;
}

/* NUCLEAR PARAGRAPH RESET */
.content-body * {
  margin-top: 0 !important;
  margin-bottom: 0.8em !important;
}

.content-body p {
  text-indent: 0 !important;
  margin-bottom: 0.8em !important;
}

.content-body > *:first-child,
.content-body p:first-of-type {
  margin-top: 0 !important;
}

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

.article-author-bio {
  margin-top: 20px;
  font-size: 0.9em;
  background: #f4f4f4;
  padding: 10px;
  border-radius: 4px;
}