MediaWiki:Common.css: Difference between revisions

From AbhiprayaVedi
No edit summary
mNo edit summary
 
(105 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"],
.article-container[lang="en"],
.right-sidebar[lang="en"],
#mw-content-text[lang="en"],
#mw-navigation[lang="en"],
.form-container[lang="en"] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  --color-primary: #212529;
  --color-secondary: #667eea;
  --color-accent: #17a2b8;
  --color-neutral: #f8f9fa;
}
 
.mw-body[lang="ml"],
.article-container[lang="ml"],
.right-sidebar[lang="ml"],
#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;
}
 
/* ================================================================
  ARTICLE LAYOUT
  ================================================================ */
.article-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
 
/* Header: single line, styled */
.article-header {
  background: var(--color-neutral);
  border-bottom: 2px solid var(--color-primary);
  padding: 8px 16px;
  border-radius: 6px;
}
 
.article-header .author-info {
  display: flex;
  align-items: center;
  gap: 12px; /* inline spacing */
}
 
.author-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
}
 
.date-info {
  font-size: 1rem;
  color: #6c757d;
}
 
.category-badge {
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--color-secondary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
}
 
/* Intro section */
.introduction-section {
  background: var(--color-neutral);
  border-left: 4px solid var(--color-secondary);
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1.5;
}
 
/* Reset default paragraph spacing/indent */
.article-header p,
.introduction-section p,
.article-text p {
  margin: 0;
  text-indent: 0;
  line-height: 1.5;
}


.article-text p:first-of-type {
:lang(ml),
  margin-top: 0;
:lang(ml) * {
  font-size: 1rem;
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
  line-height: 1.6;
}
}


/* Content wrapper: two-column layout */
/* Hide namespace subtitle for published articles */
.content-wrapper {
.mw-displaytitle-subtitle {
  display: flex;
    display: none !important;
  gap: 20px;
}
}


/* Main content */
/* Global minor tweaks only */
.main-content {
body {
   flex: 3;
   line-height: 1.7;
}
}


.article-text {
/* Main Article Title (Skin H1) */
  font-size: 1rem;
#firstHeading,
  line-height: 1.6;
.mw-first-heading {
  margin-bottom: 20px;
    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 ================ */


/* Sidebar fixed to the right */
body:lang(ml),
.right-sidebar {
.mw-body:lang(ml),
  flex: 1;
.mw-body-content:lang(ml),
  background: var(--color-neutral);
#content:lang(ml),
  padding: 12px;
.mw-parser-output:lang(ml),
  border-radius: 6px;
.article-content:lang(ml),
  display: flex;
.intro-box:lang(ml),
  flex-direction: column;
p:lang(ml),
  gap: 15px;
span:lang(ml),
div:lang(ml) {
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', 'Nirmala UI', sans-serif !important;
    line-height: 1.85 !important;
}
}


/* Responsive: stack sidebar below on small screens */
/* Extra force for article body */
@media (max-width: 768px) {
.article-content * {
  .content-wrapper {
     font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
     flex-direction: column;
  }
  .right-sidebar {
    order: 2;
  }
}
}


/* ================================================================
/* Malayalam Headings */
  FIRST HEADING (Article Title)
h1:lang(ml), h2:lang(ml), h3:lang(ml), h4:lang(ml) {
  ================================================================ */
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
.mw-body h1.firstHeading {
  font-weight: 700;
  line-height: 1.3;
  margin: 0.4em 0;
  color: var(--color-primary);
}
}


/* ================================================================
/* Force Malayalam Font on Main Article Title */
  SIDEBAR & CATEGORY LISTINGS
#firstHeading,
  ================================================================ */
.mw-first-heading,
.right-sidebar,
.firstHeading {
.right-sidebar .mw-category,
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
.right-sidebar .mw-list-item {
    font-weight: bold !important;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-primary);
}
}


/* ================================================================
/* Also for Malayalam in general headings */
  NAVIGATION TABS
:lang(ml) h1,
  ================================================================ */
:lang(ml) h2,
#mw-navigation .tab {
:lang(ml) h3 {
  font-size: 0.95rem;
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  background: var(--color-neutral);
  color: var(--color-primary);
}
}


#mw-navigation .tab.active {
/* Hide top tabs (Submissions, Discussion, Edit, etc.) for anonymous users */
  background: var(--color-secondary);
.anon .mw-indicators,
  color: #fff;
.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;
}
}


#mw-navigation .tab:hover {
/* Force Malayalam on Main Title */
  background: var(--color-accent);
#firstHeading,
  color: #fff;
.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 */
  FORM USABILITY (Form:Article, Submit:Article)
:lang(en) #firstHeading,
  ================================================================ */
:lang(en) .mw-first-heading {
.form-container {
    font-size: 2.45em !important;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}
}


.form-header {
/* ================ HIDE SIDE PANELS FOR ANONYMOUS USERS ================ */
  background: var(--color-primary);
  color: #fff;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 25px;
  text-align: center;
}
 
.form-section {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 20px;
}
 
.form-required {
  border-left: 5px solid #dc3545; /* red for required */
}
 
.form-optional {
  border-left: 5px solid #28a745; /* green for optional */
}
 
.form-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
}
 
.form-label {
  width: 180px;
  text-align: right;
  padding: 10px 15px 10px 0;
  vertical-align: top;
}
 
.form-field {
  padding: 10px 0;
}
 
.form-hint {
  color: #666;
  font-size: 0.85rem;
  margin-top: 4px;
  display: block;
}


/* Tightened rhythm for inputs */
/* വായനക്കാർ ലോഗിൻ ചെയ്തിട്ടില്ലെങ്കിൽ (Anonymous) മാത്രം ഈ സ്റ്റൈലുകൾ ബാധകമാകും */
.mw-htmlform-field label,
body.user-anonymous .article-sidebar,
.mw-htmlform-field input,
body.user-anonymous #mw-panel,  
.mw-htmlform-field textarea,
body.user-anonymous .mw-sidebar,
.mw-htmlform-field select {
body.user-anonymous #sidebar,
  line-height: 1.3;
body.user-anonymous .right-sidebar {
  font-size: 1rem;
    display: none !important; /* സൈഡ് പാനലുകൾ പൂർണ്ണമായി മറയ്ക്കുന്നു */
    width: 0 !important;
    visibility: hidden !important;
}
}


/* Submission controls */
/*  
.form-controls {
* സൈഡ് പാനൽ മറയ്ക്കുമ്പോൾ പ്രധാന ലേഖന ഭാഗം (Main Content Area)
  text-align: center;
* പേജിന്റെ മുഴുവൻ വീതിയിലേക്കും (Full Width) മനോഹരമായി വ്യാപിച്ചു നിൽക്കാൻ താഴെ പറയുന്നവ സഹായിക്കും.
  padding: 25px;
*/
  background: var(--color-neutral);
body.user-anonymous #content,
  border-radius: 8px;
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;
}
}


.form-controls p {
/* ആർട്ടിക്കിൾ പേജിനുള്ളിലെ മെയിൻ കണ്ടെന്റ് ഏരിയയുടെ വീതി ക്രമീകരണം */
  margin-bottom: 15px;
body.user-anonymous .article-main-wrapper {
  color: #666;
    width: 100% !important;
    float: none !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;
}