MediaWiki:Common.css: Difference between revisions

From AbhiprayaVedi
No edit summary
mNo edit summary
 
(150 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* ===== COMPLETE WORKING CSS FOR YOUR TEMPLATE ===== */
/* Load Malayalam Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Manjari:wght@400;700&family=Meera:wght@400;700&display=swap');


/* 1. TITLE - FORCE CENTER ALIGNMENT */
:lang(ml),
h1#firstHeading,
:lang(ml) * {
.mw-body h1,
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
#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 */
/* Hide namespace subtitle for published articles */
#mw-content-text .article-meta,
.mw-displaytitle-subtitle {
.mw-parser-output .article-meta {
    display: none !important;
  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 {
/* Global minor tweaks only */
   display: inline !important;
body {
  margin: 0 !important;
   line-height: 1.7;
}
}


#mw-content-text .meta-line {
/* Main Article Title (Skin H1) */
  display: inline-flex !important;
#firstHeading,
  align-items: baseline !important;
.mw-first-heading {
  white-space: nowrap !important;
    font-size: 2.4em !important;
  gap: 0.5em !important;
    font-weight: bold !important;
    margin-bottom: 0.4em !important;
    color: #222;
    border-bottom: solid 4px #36c;
}
}
/* ================ FORCE MALAYALAM FONTS - HIGHEST PRIORITY ================ */


.meta-sep {
body:lang(ml),
  margin: 0 0.3em !important;
.mw-body:lang(ml),
.mw-body-content:lang(ml),
#content:lang(ml),
.mw-parser-output:lang(ml),
.article-content:lang(ml),
.intro-box:lang(ml),
p:lang(ml),
span:lang(ml),
div:lang(ml) {
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', 'Nirmala UI', sans-serif !important;
    line-height: 1.85 !important;
}
}


/* 3. MAIN WRAPPER */
/* Extra force for article body */
.article-wrapper {
.article-content * {
  max-width: 900px;
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
  margin: 0 auto;
  padding: 15px;
  font-family: Georgia, serif;
  line-height: 1.6;
  background: #fdfcfc;
}
}


.article-header {
/* Malayalam Headings */
  margin-bottom: 0.3em !important;
h1:lang(ml), h2:lang(ml), h3:lang(ml), h4:lang(ml) {
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
}
}


/* 4. CONTENT - NO BLOCK SPACING */
/* Force Malayalam Font on Main Article Title */
#mw-content-text .article-content p,
#firstHeading,
.mw-parser-output .article-content p,
.mw-first-heading,
.article-content p {
.firstHeading {
  text-indent: 0 !important;
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
  margin: 0.2em 0 0.8em 0 !important;
    font-weight: bold !important;
  padding: 0 !important;
}
}


#mw-content-text .article-content > p:first-of-type,
/* Also for Malayalam in general headings */
.mw-parser-output .article-content > p:first-of-type,
:lang(ml) h1,
.article-content > p:first-of-type,
:lang(ml) h2,
.article-content p:first-child {
:lang(ml) h3 {
  margin-top: 0 !important;
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
  padding-top: 0 !important;
}
}


.article-content {
/* Hide top tabs (Submissions, Discussion, Edit, etc.) for anonymous users */
  font-size: 1.1em;
.anon .mw-indicators,
  overflow: hidden;
.anon #mw-content-subtitle,
  clear: both !important;
.anon .vector-page-toolbar,
.anon .mw-editsection,
.anon #ca-edit,
.anon #ca-edit-source,
.anon #ca-history,
.anon #ca-view {
    display: none !important;
}
}


/* 5. FLOATBOX - THUMBNAIL + HIGHLIGHTS */
/* Force Malayalam on Main Title */
.article-floatbox {
#firstHeading,
  float: right !important;
.mw-first-heading,
  width: 220px !important;
.firstHeading {
  margin: 0 0 1em 1.5em !important;
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
  background: #f8f9fa;
    font-size: 2.35em !important;
  padding: 12px;
    font-weight: 700 !important;
  border-left: 4px solid #dee2e6;
  overflow: hidden;
}
}


.article-floatbox h3 {
/* English Title Size */
  margin: 0 0 8px 0 !important;
:lang(en) #firstHeading,
  font-size: 0.95em !important;
:lang(en) .mw-first-heading {
    font-size: 2.45em !important;
}
}


/* HIGHLIGHTS BELOW THUMBNAIL */
/* ================ HIDE SIDE PANELS FOR ANONYMOUS USERS ================ */
.article-highlights {
  margin-top: 12px !important;
  float: none !important;
  width: 100% !important;
  clear: both;
}


.article-highlights ul {
/* വായനക്കാർ ലോഗിൻ ചെയ്തിട്ടില്ലെങ്കിൽ (Anonymous) മാത്രം ഈ സ്റ്റൈലുകൾ ബാധകമാകും */
  margin: 0 !important;
body.user-anonymous .article-sidebar,
  padding: 0 !important;
body.user-anonymous #mw-panel,
  list-style: none !important;
body.user-anonymous .mw-sidebar,
body.user-anonymous #sidebar,
body.user-anonymous .right-sidebar {
    display: none !important; /* സൈഡ് പാനലുകൾ പൂർണ്ണമായി മറയ്ക്കുന്നു */
    width: 0 !important;
    visibility: hidden !important;
}
}


.article-highlights li {
/*
  margin-bottom: 10px !important;
* സൈഡ് പാനൽ മറയ്ക്കുമ്പോൾ പ്രധാന ലേഖന ഭാഗം (Main Content Area)
  padding-bottom: 6px !important;
* പേജിന്റെ മുഴുവൻ വീതിയിലേക്കും (Full Width) മനോഹരമായി വ്യാപിച്ചു നിൽക്കാൻ താഴെ പറയുന്നവ സഹായിക്കും.
  border-bottom: 1px solid #dee2e6 !important;
*/
  font-size: 0.9em;
body.user-anonymous #content,
body.user-anonymous #mw-content-text,
body.user-anonymous .article-content,
body.user-anonymous .mw-body {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}
}


.article-highlights li:last-child {
/* ആർട്ടിക്കിൾ പേജിനുള്ളിലെ മെയിൻ കണ്ടെന്റ് ഏരിയയുടെ വീതി ക്രമീകരണം */
  margin-bottom: 0 !important;
body.user-anonymous .article-main-wrapper {
  border-bottom: none !important;
     width: 100% !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;
     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;
}
}

Latest revision as of 22:40, 11 June 2026

/* Load Malayalam Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Manjari:wght@400;700&family=Meera:wght@400;700&display=swap');

:lang(ml),
:lang(ml) * {
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
}

/* Hide namespace subtitle for published articles */
.mw-displaytitle-subtitle {
    display: none !important;
}

/* Global minor tweaks only */
body {
  line-height: 1.7;
}

/* Main Article Title (Skin H1) */
#firstHeading,
.mw-first-heading {
    font-size: 2.4em !important;
    font-weight: bold !important;
    margin-bottom: 0.4em !important;
    color: #222;
    border-bottom: solid 4px #36c;
}
/* ================ FORCE MALAYALAM FONTS - HIGHEST PRIORITY ================ */

body:lang(ml),
.mw-body:lang(ml),
.mw-body-content:lang(ml),
#content:lang(ml),
.mw-parser-output:lang(ml),
.article-content:lang(ml),
.intro-box:lang(ml),
p:lang(ml),
span:lang(ml),
div:lang(ml) {
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', 'Nirmala UI', sans-serif !important;
    line-height: 1.85 !important;
}

/* Extra force for article body */
.article-content * {
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
}

/* Malayalam Headings */
h1:lang(ml), h2:lang(ml), h3:lang(ml), h4:lang(ml) {
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
}

/* Force Malayalam Font on Main Article Title */
#firstHeading,
.mw-first-heading,
.firstHeading {
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
    font-weight: bold !important;
}

/* Also for Malayalam in general headings */
:lang(ml) h1,
:lang(ml) h2,
:lang(ml) h3 {
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
}

/* Hide top tabs (Submissions, Discussion, Edit, etc.) for anonymous users */
.anon .mw-indicators,
.anon #mw-content-subtitle,
.anon .vector-page-toolbar,
.anon .mw-editsection,
.anon #ca-edit,
.anon #ca-edit-source,
.anon #ca-history,
.anon #ca-view {
    display: none !important;
}

/* Force Malayalam on Main Title */
#firstHeading,
.mw-first-heading,
.firstHeading {
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
    font-size: 2.35em !important;
    font-weight: 700 !important;
}

/* English Title Size */
:lang(en) #firstHeading,
:lang(en) .mw-first-heading {
    font-size: 2.45em !important;
}

/* ================ HIDE SIDE PANELS FOR ANONYMOUS USERS ================ */

/* വായനക്കാർ ലോഗിൻ ചെയ്തിട്ടില്ലെങ്കിൽ (Anonymous) മാത്രം ഈ സ്റ്റൈലുകൾ ബാധകമാകും */
body.user-anonymous .article-sidebar,
body.user-anonymous #mw-panel, 
body.user-anonymous .mw-sidebar,
body.user-anonymous #sidebar,
body.user-anonymous .right-sidebar {
    display: none !important; /* സൈഡ് പാനലുകൾ പൂർണ്ണമായി മറയ്ക്കുന്നു */
    width: 0 !important;
    visibility: hidden !important;
}

/* 
 * സൈഡ് പാനൽ മറയ്ക്കുമ്പോൾ പ്രധാന ലേഖന ഭാഗം (Main Content Area) 
 * പേജിന്റെ മുഴുവൻ വീതിയിലേക്കും (Full Width) മനോഹരമായി വ്യാപിച്ചു നിൽക്കാൻ താഴെ പറയുന്നവ സഹായിക്കും.
 */
body.user-anonymous #content,
body.user-anonymous #mw-content-text,
body.user-anonymous .article-content,
body.user-anonymous .mw-body {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* ആർട്ടിക്കിൾ പേജിനുള്ളിലെ മെയിൻ കണ്ടെന്റ് ഏരിയയുടെ വീതി ക്രമീകരണം */
body.user-anonymous .article-main-wrapper {
    width: 100% !important;
    float: none !important;
}