MediaWiki:Common.css: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 504: | Line 504: | ||
opacity: 1; | opacity: 1; | ||
transform: translateX(-50%) translateY(0); | transform: translateX(-50%) translateY(0); | ||
} | |||
/* ════════════════════════════════════════════════ | |||
Grantha — Main Page styles | |||
Edit at: yourdomain.com/wiki/MediaWiki:Common.css | |||
════════════════════════════════════════════════ */ | |||
#se-home { | |||
font-family: system-ui, -apple-system, sans-serif; | |||
max-width: 680px; | |||
margin: 0 auto; | |||
padding: 0 0 48px; | |||
} | |||
#se-home h2, | |||
#se-home .mw-heading { | |||
display: none; | |||
} | |||
.se-hero { | |||
background: linear-gradient( 160deg, #f7f4ef 0%, #faf8f3 60%, #eef3f8 100% ); | |||
padding: 44px 28px 36px; | |||
text-align: center; | |||
border-radius: 12px; | |||
margin-bottom: 32px; | |||
border: 1px solid #e8e4dc; | |||
} | |||
.se-hero-verse { | |||
font-size: 14px; | |||
color: #8a7e6c; | |||
font-style: italic; | |||
line-height: 1.9; | |||
margin-bottom: 18px; | |||
opacity: .85; | |||
} | |||
.se-hero-title { | |||
font-size: 30px; | |||
font-weight: 700; | |||
color: #1a2e40; | |||
letter-spacing: -.01em; | |||
margin-bottom: 6px; | |||
} | |||
.se-hero-sub { | |||
font-size: 13px; | |||
color: #8a9bb0; | |||
} | |||
.se-section { | |||
margin-bottom: 32px; | |||
} | |||
.se-section-label { | |||
font-size: 11px; | |||
font-weight: 700; | |||
text-transform: uppercase; | |||
letter-spacing: .1em; | |||
color: #8a9bb0; | |||
margin-bottom: 10px; | |||
padding-bottom: 8px; | |||
border-bottom: 1px solid #eef0f3; | |||
} | |||
.se-doclist { | |||
border: 1px solid #e8eaed; | |||
border-radius: 10px; | |||
overflow: hidden; | |||
} | |||
.se-docrow { | |||
display: flex; | |||
align-items: center; | |||
gap: 14px; | |||
padding: 14px 20px; | |||
background: #fff; | |||
border-bottom: 1px solid #f0f2f5; | |||
transition: background .1s; | |||
} | |||
.se-docrow:last-child { | |||
border-bottom: none; | |||
} | |||
.se-docrow:hover { | |||
background: #f7f9fc; | |||
} | |||
.se-docrow--dev { | |||
background: #f5f8ff; | |||
} | |||
.se-docrow--dev:hover { | |||
background: #edf2ff; | |||
} | |||
.se-docrow-num { | |||
font-size: 12px; | |||
color: #c8d0da; | |||
min-width: 20px; | |||
flex-shrink: 0; | |||
font-variant-numeric: tabular-nums; | |||
} | |||
.se-docrow-title { | |||
font-size: 14.5px; | |||
font-weight: 600; | |||
flex: 1; | |||
} | |||
.se-docrow-title a { | |||
color: #1a2e40; | |||
text-decoration: none; | |||
display: block; | |||
} | |||
.se-docrow-title a:hover { | |||
color: #2a5298; | |||
} | |||
.se-doclist-actions { | |||
margin-top: 14px; | |||
} | |||
.se-newdoc-trigger { | |||
display: inline-flex; | |||
align-items: center; | |||
gap: 7px; | |||
font-size: 13px; | |||
font-weight: 600; | |||
color: #1a2e40; | |||
padding: 8px 20px; | |||
border-radius: 20px; | |||
border: 1.5px solid #1a2e40; | |||
cursor: pointer; | |||
transition: background .14s, color .14s; | |||
} | |||
.se-newdoc-trigger:hover { | |||
background: #1a2e40; | |||
color: #fff; | |||
} | } | ||
Revision as of 08:54, 6 April 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 {
max-height: 0;
overflow: hidden;
opacity: 0;
transition: all 0.3s ease;
}
.commentary-body.open {
max-height: 200px;
opacity: 1;
border: 1px solid #ededed;
background: #fafafa;
padding: 5px 10px;
overflow: auto;
}
.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;
}
.commentary-body {
max-height: 0;
overflow: hidden;
opacity: 0;
transition: all 0.3s ease;
}
.commentary-body.open {
max-height: 500px;
opacity: 1;
}
.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 {
display: inline-block;
width: 14px;
height: 14px;
vertical-align: middle;
cursor: pointer;
background-image: url('/images/copy.svg');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
/* ── 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;
}
}
/* Your icons */
.icon-copy {
background-image: url('/images/copy.svg');
}
.icon-commentary {
background-image: url('/images/commentary.svg');
}
/* Optional polish */
.verse-action-btn {
cursor: pointer;
opacity: 0.7;
transition: opacity 0.2s ease;
}
.verse-action-btn:hover {
opacity: 1;
}
.shloka-line {
display: flex;
align-items: center; /* better */
justify-content: flex-start; /* IMPORTANT */
gap: 10px;}
/* Keep text natural */
.shloka-line > *:first-child {
flex: 1;
}
/* Actions aligned nicely */
.verse-actions {
display: inline-flex;
align-items: center;
gap: 10px;
margin-left: 12px;
opacity: 0.8;
padding-left: 12px;
}
/* Icon tuning */
.icon {
display: inline-block;
width: 18px;
height: 18px;
background-repeat: no-repeat;
background-position: center;
background-size: contain;
transform: translateY(2px);
pointer-events: none;
}
.verse-action-btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 4px;
border-radius: 6px;
cursor: pointer;
opacity: 0.75;
transition: all 0.2s ease;
}
/* Hover */
.verse-action-btn:hover {
opacity: 1;
background-color: rgba(0,0,0,0.05);
transform: scale(1.05);
}
/* Default */
.verse-action-commentary {
opacity: 0.7;
}
/* Active (OPEN) */
.verse-action-commentary.active {
background-color: rgba(0, 0, 0, 0.08);
opacity: 1;
}
/* Optional: color tint if SVG is monochrome */
.verse-action-commentary.active .icon {
filter: invert(25%) sepia(80%) saturate(500%) hue-rotate(200deg);
}
/* =========================
VERSE ACTIONS ROW
========================= */
.verse-block {
display: flex;
flex-direction: column;
}
.verse-actions {
display: flex;
flex-direction: row;
align-items: center;
gap: 6px;
margin-top: 6px;
padding-left: 2px;
}
/* =========================
COPY TOOLTIP
========================= */
.copy-tooltip {
position: absolute;
bottom: calc(100% + 8px);
left: 50%;
transform: translateX(-50%) translateY(4px);
white-space: nowrap;
pointer-events: none;
z-index: 9999;
display: inline-flex;
align-items: center;
padding: 2px;
border-radius: 999px;
font-size: 0.25rem;
font-weight: 500;
letter-spacing: 0.02em;
background: rgba(30, 30, 30, 0.82);
color: #fff;
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
opacity: 0;
transition: opacity 0.2s ease, transform 0.2s ease;
}
.copy-tooltip.copy-tooltip-visible {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
/* ════════════════════════════════════════════════
Grantha — Main Page styles
Edit at: yourdomain.com/wiki/MediaWiki:Common.css
════════════════════════════════════════════════ */
#se-home {
font-family: system-ui, -apple-system, sans-serif;
max-width: 680px;
margin: 0 auto;
padding: 0 0 48px;
}
#se-home h2,
#se-home .mw-heading {
display: none;
}
.se-hero {
background: linear-gradient( 160deg, #f7f4ef 0%, #faf8f3 60%, #eef3f8 100% );
padding: 44px 28px 36px;
text-align: center;
border-radius: 12px;
margin-bottom: 32px;
border: 1px solid #e8e4dc;
}
.se-hero-verse {
font-size: 14px;
color: #8a7e6c;
font-style: italic;
line-height: 1.9;
margin-bottom: 18px;
opacity: .85;
}
.se-hero-title {
font-size: 30px;
font-weight: 700;
color: #1a2e40;
letter-spacing: -.01em;
margin-bottom: 6px;
}
.se-hero-sub {
font-size: 13px;
color: #8a9bb0;
}
.se-section {
margin-bottom: 32px;
}
.se-section-label {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: .1em;
color: #8a9bb0;
margin-bottom: 10px;
padding-bottom: 8px;
border-bottom: 1px solid #eef0f3;
}
.se-doclist {
border: 1px solid #e8eaed;
border-radius: 10px;
overflow: hidden;
}
.se-docrow {
display: flex;
align-items: center;
gap: 14px;
padding: 14px 20px;
background: #fff;
border-bottom: 1px solid #f0f2f5;
transition: background .1s;
}
.se-docrow:last-child {
border-bottom: none;
}
.se-docrow:hover {
background: #f7f9fc;
}
.se-docrow--dev {
background: #f5f8ff;
}
.se-docrow--dev:hover {
background: #edf2ff;
}
.se-docrow-num {
font-size: 12px;
color: #c8d0da;
min-width: 20px;
flex-shrink: 0;
font-variant-numeric: tabular-nums;
}
.se-docrow-title {
font-size: 14.5px;
font-weight: 600;
flex: 1;
}
.se-docrow-title a {
color: #1a2e40;
text-decoration: none;
display: block;
}
.se-docrow-title a:hover {
color: #2a5298;
}
.se-doclist-actions {
margin-top: 14px;
}
.se-newdoc-trigger {
display: inline-flex;
align-items: center;
gap: 7px;
font-size: 13px;
font-weight: 600;
color: #1a2e40;
padding: 8px 20px;
border-radius: 20px;
border: 1.5px solid #1a2e40;
cursor: pointer;
transition: background .14s, color .14s;
}
.se-newdoc-trigger:hover {
background: #1a2e40;
color: #fff;
}