MediaWiki:Common.css: Difference between revisions

From AbhiprayaVedi
No edit summary
mNo edit summary
 
(106 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* ================================================================
/* Load Malayalam Google Fonts */
  LANGUAGE-AWARE TYPOGRAPHY & COLOR VARIABLES
@import url('https://fonts.googleapis.com/css2?family=Manjari:wght@400;700&family=Meera:wght@400;700&display=swap');
  ================================================================ */
 
.mw-body[lang="en"],
:lang(ml),
.article-container[lang="en"],
:lang(ml) * {
.right-sidebar[lang="en"],
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
#mw-content-text[lang="en"],
}
#mw-navigation[lang="en"],
 
.form-container[lang="en"] {
/* Hide namespace subtitle for published articles */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
.mw-displaytitle-subtitle {
  line-height: 1.6;
    display: none !important;
  --color-primary: #212529;
  --color-secondary: #667eea;
  --color-accent: #17a2b8;
  --color-neutral: #f8f9fa;
}
}


.mw-body[lang="ml"],
/* Global minor tweaks only */
.article-container[lang="ml"],
body {
.right-sidebar[lang="ml"],
   line-height: 1.7;
#mw-content-text[lang="ml"],
#mw-navigation[lang="ml"],
.form-container[lang="ml"] {
  font-family: 'Manjari','Meera','Rachana','AnjaliOldLipi','Noto Sans Malayalam',sans-serif;
   line-height: 1.75;
  --color-primary: #4a2f87;
  --color-secondary: #f59e0b;
  --color-accent: #78350f;
  --color-neutral: #f8f9fa;
}
}


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


/* Header: single line, styled */
body:lang(ml),
.article-header {
.mw-body:lang(ml),
  background: var(--color-neutral);
.mw-body-content:lang(ml),
  border-bottom: 2px solid var(--color-primary);
#content:lang(ml),
  padding: 8px 16px;
.mw-parser-output:lang(ml),
  border-radius: 6px;
.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;
}
}


.article-header .author-info {
/* Extra force for article body */
  display: flex;
.article-content * {
  align-items: center;
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
  gap: 12px; /* keeps author, date, category inline */
}
}


.author-name {
/* Malayalam Headings */
  font-size: 1.2rem;
h1:lang(ml), h2:lang(ml), h3:lang(ml), h4:lang(ml) {
  font-weight: 700;
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
  color: var(--color-primary);
}
}


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


.category-badge {
/* Also for Malayalam in general headings */
  font-size: 0.9rem;
:lang(ml) h1,
  font-weight: 600;
:lang(ml) h2,
  background: var(--color-secondary);
:lang(ml) h3 {
  color: #fff;
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
  padding: 4px 10px;
  border-radius: 20px;
}
}


/* Intro section */
/* Hide top tabs (Submissions, Discussion, Edit, etc.) for anonymous users */
.introduction-section {
.anon .mw-indicators,
  background: var(--color-neutral);
.anon #mw-content-subtitle,
  border-left: 4px solid var(--color-secondary);
.anon .vector-page-toolbar,
  padding: 12px 16px;
.anon .mw-editsection,
  border-radius: 4px;
.anon #ca-edit,
  font-size: 1rem;
.anon #ca-edit-source,
  line-height: 1.5;
.anon #ca-history,
.anon #ca-view {
    display: none !important;
}
}


/* Content wrapper: two-column layout */
/* Force Malayalam on Main Title */
.content-wrapper {
#firstHeading,
  display: flex;
.mw-first-heading,
  gap: 20px;
.firstHeading {
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
    font-size: 2.35em !important;
    font-weight: 700 !important;
}
}


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


.article-text {
/* ================ HIDE SIDE PANELS FOR ANONYMOUS USERS ================ */
  font-size: 1rem;
 
  line-height: 1.6;
/* വായനക്കാർ ലോഗിൻ ചെയ്തിട്ടില്ലെങ്കിൽ (Anonymous) മാത്രം ഈ സ്റ്റൈലുകൾ ബാധകമാകും */
  margin-bottom: 20px;
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;
}
}


/* Sidebar fixed to the right */
/*  
.right-sidebar {
* സൈഡ് പാനൽ മറയ്ക്കുമ്പോൾ പ്രധാന ലേഖന ഭാഗം (Main Content Area)
  flex: 1;
* പേജിന്റെ മുഴുവൻ വീതിയിലേക്കും (Full Width) മനോഹരമായി വ്യാപിച്ചു നിൽക്കാൻ താഴെ പറയുന്നവ സഹായിക്കും.
  background: var(--color-neutral);
*/
  padding: 12px;
body.user-anonymous #content,
  border-radius: 6px;
body.user-anonymous #mw-content-text,
  display: flex;
body.user-anonymous .article-content,
  flex-direction: column;
body.user-anonymous .mw-body {
  gap: 15px;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}
}


/* Responsive: stack sidebar below on small screens */
/* ആർട്ടിക്കിൾ പേജിനുള്ളിലെ മെയിൻ കണ്ടെന്റ് ഏരിയയുടെ വീതി ക്രമീകരണം */
@media (max-width: 768px) {
body.user-anonymous .article-main-wrapper {
  .content-wrapper {
     width: 100% !important;
     flex-direction: column;
     float: none !important;
  }
  .right-sidebar {
     order: 2;
  }
}
}

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;
}