Jump to content

MediaWiki:Common.css: Difference between revisions

From Grantha
No edit summary
No edit summary
Line 18: Line 18:
   .mw-parser-output on every page load via applyFontSize().
   .mw-parser-output on every page load via applyFontSize().
   The 20px here is the no-JS fallback only.
   The 20px here is the no-JS fallback only.
   All children use font-size: 1rem so they scale with it.
   All children use font-size: 1em so they scale with it.
   ────────────────────────────────────────────────────────────────── */
   ────────────────────────────────────────────────────────────────── */
.mw-parser-output {
.mw-parser-output {
Line 35: Line 35:
.mw-parser-output div {
.mw-parser-output div {
   font-family: inherit;
   font-family: inherit;
   font-size: 1rem;
   font-size: 1em;
   line-height: inherit;
   line-height: inherit;
}
}
Line 47: Line 47:
.mw-parser-output h6 {
.mw-parser-output h6 {
   font-family: inherit;
   font-family: inherit;
   font-size: 1rem;
   font-size: 1em;
   font-weight: bold;
   font-weight: bold;
   line-height: 1.75;
   line-height: 1.75;
Line 57: Line 57:


.mw-parser-output h2 {
.mw-parser-output h2 {
   font-size: 1.1rem;
   font-size: 1.1em;
}
}


Line 80: Line 80:
   display: block;
   display: block;
   font-family: inherit;
   font-family: inherit;
   font-size: 1rem;
   font-size: 1em;
   margin: 0.5rem 0 1rem 0;
   margin: 0.5rem 0 1rem 0;
   padding-left: 0;
   padding-left: 0;
Line 94: Line 94:
   display: block;
   display: block;
   font-family: inherit;
   font-family: inherit;
   font-size: 1rem;
   font-size: 1em;
   line-height: 1.75;
   line-height: 1.75;
   color: #333;
   color: #333;
Line 203: Line 203:
.adhyaya-heading {
.adhyaya-heading {
   font-family: inherit;
   font-family: inherit;
   font-size: 1rem;
   font-size: 1em;
   font-weight: bold;
   font-weight: bold;
   letter-spacing: 0.02em;
   letter-spacing: 0.02em;
Line 212: Line 212:
.adhyaya-heading span,
.adhyaya-heading span,
.adhyaya-block p {
.adhyaya-block p {
   font-size: 0.9rem;
   font-size: 0.9em;
   color: #666;
   color: #666;
   margin-top: 2px;
   margin-top: 2px;
Line 254: Line 254:


.nyaya-title {
.nyaya-title {
   font-size: 1rem;
   font-size: 1em;
   margin-bottom: 0.4rem;
   margin-bottom: 0.4rem;
   letter-spacing: 0.03em;
   letter-spacing: 0.03em;
Line 261: Line 261:
.nyaya-title span {
.nyaya-title span {
   display: block;
   display: block;
   font-size: 0.85rem;
   font-size: 0.85em;
   color: #666;
   color: #666;
}
}
Line 283: Line 283:


.prasna-title {
.prasna-title {
   font-size: 1rem;
   font-size: 1em;
   margin-bottom: 0.4rem;
   margin-bottom: 0.4rem;
   letter-spacing: 0.03em;
   letter-spacing: 0.03em;
Line 290: Line 290:
.prasna-title span {
.prasna-title span {
   display: block;
   display: block;
   font-size: 0.85rem;
   font-size: 0.85em;
   color: #666;
   color: #666;
}
}
Line 316: Line 316:
.verse-text {
.verse-text {
   display: inline;
   display: inline;
   font-size: 1rem;
   font-size: 1em;
   font-weight: 600;
   font-weight: 600;
   line-height: 1.75;
   line-height: 1.75;
Line 325: Line 325:
.copy-id-btn {
.copy-id-btn {
   cursor: pointer;
   cursor: pointer;
   font-size: 0.78rem;
   font-size: 0.78em;
   color: #bbb;
   color: #bbb;
   margin-left: 0.35em;
   margin-left: 0.35em;

Revision as of 06:30, 25 March 2026

@font-face {
  font-family: "Adishila";
  src: url("/resources/fonts/adishila/Adishila.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Adishila";
  src: url("/resources/fonts/adishila/AdishilaBold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

/* ── Base ───────────────────────────────────────────────────────────
   font-size is intentionally NOT set with !important here.
   ReaderToolbar JS owns font-size: it writes directly to
   .mw-parser-output on every page load via applyFontSize().
   The 20px here is the no-JS fallback only.
   All children use font-size: 1em so they scale with it.
   ────────────────────────────────────────────────────────────────── */
.mw-parser-output {
  font-family: 'Adishila', 'Noto Serif Devanagari', serif;
  font-size: 20px;
  line-height: 1.75;
  color: #222;
  max-width: 820px;
  margin: 0 auto;
}

.mw-parser-output p,
.mw-parser-output li,
.mw-parser-output td,
.mw-parser-output span,
.mw-parser-output div {
  font-family: inherit;
  font-size: 1em;
  line-height: inherit;
}

/* ── Headings: bold only, no size change ────────────────────────── */
.mw-parser-output h1,
.mw-parser-output h2,
.mw-parser-output h3,
.mw-parser-output h4,
.mw-parser-output h5,
.mw-parser-output h6 {
  font-family: inherit;
  font-size: 1em;
  font-weight: bold;
  line-height: 1.75;
  margin: 1.4rem 0 0.2rem;
  border: none;
  padding: 0;
  color: inherit;
}

.mw-parser-output h2 {
  font-size: 1.1em;
}

/* ── Paragraphs ─────────────────────────────────────────────────── */
.mw-parser-output p {
  margin: 0 0 0.85rem;
}

.mw-parser-output p:empty,
.mw-parser-output > div > p:empty {
  display: none !important;
  margin: 0 !important;
  line-height: 0 !important;
}

.mw-parser-output div[style*="font-size"] > p {
  margin: 0 !important;
}

/* ── Shloka block ───────────────────────────────────────────────── */
.shloka-block {
  display: block;
  font-family: inherit;
  font-size: 1em;
  margin: 0.5rem 0 1rem 0;
  padding-left: 0;
}

.shloka-line {
  display: block;
  line-height: 1.8;
}

/* ── Commentary body ────────────────────────────────────────────── */
.commentary-body {
  display: block;
  font-family: inherit;
  font-size: 1em;
  line-height: 1.75;
  color: #333;
  margin-top: 0.6rem;
}

.commentary-body p,
.commentary-body span,
.commentary-body div {
  font-family: inherit;
}

.commentary-body + .commentary-body {
  margin-top: 6px;
}

.commentary-body.commentary-hidden {
  display: none;
}

.commentary-body.commentary-hidden + p:empty,
.verse-block > p:empty {
  display: none;
}

/* ── Commentary toggle ──────────────────────────────────────────── */
.commentary-toggle {
  cursor: pointer;
  margin-left: 0.5em;
  font-size: 0.7em;
  vertical-align: middle;
  opacity: 0.4;
  user-select: none;
  display: inline;
  transition: opacity 0.2s ease;
}

.commentary-toggle:hover {
  opacity: 1;
}

body.hide-commentary .commentary-block {
  display: none;
}

.commentary-toggle-btn {
  margin-bottom: 1em;
  padding: 6px 14px;
  cursor: pointer;
}

/* ── Fix mw-collapsible toggle ──────────────────────────────────── */
.commentary-block .mw-collapsible-toggle {
  font-family: inherit;
  display: block;
  width: 100%;
  box-sizing: border-box;
  border-left: 4px solid #8b6914;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: bold;
  text-align: left;
  float: none !important;
}

.adhyaya-intro .mw-collapsible-toggle {
  font-family: inherit;
  display: block;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  font-weight: bold;
  text-align: left;
  float: none !important;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.78em;
}

.commentary-block .mw-collapsible-toggle a {
  font-family: inherit;
  text-decoration: none;
}

.mw-collapsible,
.mw-collapsible-content,
blockquote,
.quotebox {
  background-color: transparent !important;
  border: none !important;
  font-style: normal !important;
  padding: 0 !important;
  margin-left: 0 !important;
}

/* ── Cargo store ────────────────────────────────────────────────── */
.cargo-store-only {
  display: none !important;
}

/* ── Adhyaya (Chapter) ──────────────────────────────────────────── */
.adhyaya-block {
  font-family: inherit;
  margin: 32px 0 18px;
  text-align: left;
}

.adhyaya-heading {
  font-family: inherit;
  font-size: 1em;
  font-weight: bold;
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1.75;
}

.adhyaya-heading span,
.adhyaya-block p {
  font-size: 0.9em;
  color: #666;
  margin-top: 2px;
}

.adhyaya-anchor {
  opacity: 0;
  transition: opacity 0.2s;
}

.adhyaya-heading:hover .adhyaya-anchor {
  opacity: 0.7;
}

.adhyaya-intro.mw-collapsible {
  font-family: inherit;
}

.adhyaya-intro {
  margin-top: 10px;
  line-height: 1.85;
  color: #444;
}

/* ── Nyaya (Reasoning block) ────────────────────────────────────── */
.nyaya-block {
  font-family: inherit;
  margin: 40px 0;
  padding-top: 14px;
  border-top: 1px solid #eee;
}

.nyaya-block a[href^="#"] {
  opacity: 0;
  transition: opacity 0.2s;
}

.nyaya-block:hover a[href^="#"] {
  opacity: 0.7;
}

.nyaya-title {
  font-size: 1em;
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
}

.nyaya-title span {
  display: block;
  font-size: 0.85em;
  color: #666;
}

/* ── Prasna (Question block) ────────────────────────────────────── */
.prasna-block {
  font-family: inherit;
  margin: 40px 0;
  padding-top: 14px;
  border-top: 1px solid #eee;
}

.prasna-block a[href^="#"] {
  opacity: 0;
  transition: opacity 0.2s;
}

.prasna-block:hover a[href^="#"] {
  opacity: 0.7;
}

.prasna-title {
  font-size: 1em;
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
}

.prasna-title span {
  display: block;
  font-size: 0.85em;
  color: #666;
}

/* ── ID chips ───────────────────────────────────────────────────── */
.nyaya-id,
.prasna-id {
  font-family: 'Consolas', 'Liberation Mono', monospace;
}

/* ── Verse block ────────────────────────────────────────────────── */
.verse-block {
  margin: 10px 0;
}

.verse-block:hover {
  background: #fafafa;
}

.verse-block + p {
  display: none !important;
  margin: 0 !important;
}

.verse-text {
  display: inline;
  font-size: 1em;
  font-weight: 600;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

/* ── CopyID button ──────────────────────────────────────────────── */
.copy-id-btn {
  cursor: pointer;
  font-size: 0.78em;
  color: #bbb;
  margin-left: 0.35em;
  vertical-align: middle;
  user-select: none;
  border: none;
  background: none;
  padding: 0;
  transition: color 0.2s;
}

.copy-id-btn:hover {
  color: #666;
}

.copy-id-btn.copied {
  color: #2a9d2a;
}

/* ── Code blocks ────────────────────────────────────────────────── */
pre, code, .mw-code {
  background-color: transparent;
  border: none;
  padding: 0.5em;
  line-height: 1;
  margin: 0.5em;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .mw-parser-output {
    font-size: 16px;
  }
  .nyaya-id,
  .prasna-id,
  .adhyaya-anchor {
    display: none;
  }
}