MediaWiki:Common.css: Difference between revisions

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


/*BASE TYPOGRAPHY*/
:lang(ml),
 
:lang(ml) * {
:lang(en) {
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
}


:lang(ml) {
/* Hide namespace subtitle for published articles */
  font-family: 'Manjari', 'Meera', 'Rachana', 'AnjaliOldLipi', 'Noto Sans Malayalam', sans-serif;
.mw-displaytitle-subtitle {
  line-height: 1.75;
    display: none !important;
}
}


/* Global minor tweaks only */
body {
body {
  font-size: 17px;
   line-height: 1.7;
}
 
/*ARTICLE CONTAINER (Scoped Control)*/
 
.article-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
}
.article-container .main-content {
  min-width: 0;  /* already present but essential */
}
 
.article-container * {
  box-sizing: border-box;
}
 
/* Basic spacing */
.article-container p {
  margin: 0 0 1em 0;
}
 
.article-container ul,
.article-container ol {
  padding-left: 1.2em;
  margin-bottom: 1em;
}
 
.article-container li {
  margin: 0.25em 0;
}
 
/* Headings */
.article-container h1,
.article-container h2,
.article-container h3,
.article-container h4 {
  margin: 0.6em 0 0.4em;
   line-height: 1.3;
  font-weight: 600;
}
 
.article-container .main-content::after {
  content: "";
  display: block;
  clear: both;
}
 
/*MEDIAWIKI IMAGE SYSTEM (CRITICAL — FIXED)*/
 
 
/* ===== CLEAN MEDIAWIKI IMAGE SYSTEM ===== */
 
.article-container figure.mw-halign-left,
.article-container figure.mw-halign-right,
.article-container figure.mw-halign-center {
  float: none !important;
  margin: 0 !important;
}
 
.article-container .image-left {
  float: left;
  margin: 0 12px 8px 0;
  max-width: 45%;
}
 
/* FIGURE = single source of truth */
.article-container figure[typeof~='mw:File/Thumb'],
.article-container figure[typeof~='mw:File/Frame'] {
  display: block;
  width: 100%;    /* follow container */
  margin: 0;
}
}


/* Make anchor behave correctly */
/* Main Article Title (Skin H1) */
.article-container figure > a {
#firstHeading,
  display: block;
.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 ================ */


/* Image */
body:lang(ml),
.article-container figure img {
.mw-body:lang(ml),
  display: block;
.mw-body-content:lang(ml),
  width: 100%;
#content:lang(ml),
  height: auto;
.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;
}
}


/* Caption */
/* Extra force for article body */
.article-container figure figcaption {
.article-content * {
  display: block;
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
  width: 100%;
  box-sizing: border-box;
 
  margin-top: 6px;
 
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}
}


/*SIMPLE CONTENT LAYOUT*/
/* Malayalam Headings */
 
h1:lang(ml), h2:lang(ml), h3:lang(ml), h4:lang(ml) {
.article-container .content-wrapper {
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
}


.article-container .main-content {
/* Force Malayalam Font on Main Article Title */
  flex: 1 1 0;
#firstHeading,
  min-width: 0;
.mw-first-heading,
.firstHeading {
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
    font-weight: bold !important;
}
}


.article-container .right-sidebar {
/* Also for Malayalam in general headings */
  flex: 0 0 260px;   /* fixed width column */
:lang(ml) h1,
:lang(ml) h2,
:lang(ml) h3 {
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
}
}


/*AUTHOR BLOCK (cleaned)*/
/* Hide top tabs (Submissions, Discussion, Edit, etc.) for anonymous users */
 
.anon .mw-indicators,
.article-container .article-header {
.anon #mw-content-subtitle,
  background: #C7D2FE;
.anon .vector-page-toolbar,
  text-align: center;
.anon .mw-editsection,
  padding: 4px 0;
.anon #ca-edit,
.anon #ca-edit-source,
.anon #ca-history,
.anon #ca-view {
    display: none !important;
}
}


.article-container .author-info {
/* Force Malayalam on Main Title */
  display: flex;
#firstHeading,
  justify-content: center;
.mw-first-heading,
  align-items: center;
.firstHeading {
  gap: 6px;
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
  font-size: 1em;
    font-size: 2.35em !important;
  color: #444;
    font-weight: 700 !important;
}
}


.article-container .author-info span:not(:last-child)::after {
/* English Title Size */
  content: "•";
:lang(en) #firstHeading,
  margin-left: 6px;
:lang(en) .mw-first-heading {
  color: #999;
    font-size: 2.45em !important;
}
}


.article-container .author-name {
/* ================ HIDE SIDE PANELS FOR ANONYMOUS USERS ================ */
  font-weight: 600;
}


.article-container .date-info {
/* വായനക്കാർ ലോഗിൻ ചെയ്തിട്ടില്ലെങ്കിൽ (Anonymous) മാത്രം ഈ സ്റ്റൈലുകൾ ബാധകമാകും */
  font-size: 0.9em;
body.user-anonymous .article-sidebar,
  color: #666;
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;
}
}


/*INTRO BLOCK*/
/*  
 
* സൈഡ് പാനൽ മറയ്ക്കുമ്പോൾ പ്രധാന ലേഖന ഭാഗം (Main Content Area)
.article-container .introduction-section {
* പേജിന്റെ മുഴുവൻ വീതിയിലേക്കും (Full Width) മനോഹരമായി വ്യാപിച്ചു നിൽക്കാൻ താഴെ പറയുന്നവ സഹായിക്കും.
  background: #f5f7fa;
*/
  border-left: 4px solid #4a6edb;
body.user-anonymous #content,
  padding: 10px 14px;
body.user-anonymous #mw-content-text,
  margin-bottom: 14px;
body.user-anonymous .article-content,
  border-radius: 4px;
body.user-anonymous .mw-body {
  line-height: 1.6;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}
}


/*SIDEBAR (Author Image)*/
/* ആർട്ടിക്കിൾ പേജിനുള്ളിലെ മെയിൻ കണ്ടെന്റ് ഏരിയയുടെ വീതി ക്രമീകരണം */
 
body.user-anonymous .article-main-wrapper {
.article-container .author-infobox {
     width: 100% !important;
  display: flex;
    float: none !important;
  flex-direction: column;
  align-items: center;
}
 
.article-container .author-photo {
  border: 1px solid #ccc;
  padding: 2px;
  max-width: 180px;
}
 
.article-container .author-photo img {
  display: block;
  max-width: 100%;
}
 
.article-container .author-name-box {
  text-align: center;
  margin-top: 6px;
}
 
/*HIGHLIGHT / KEYPOINT BOXES*/
 
.article-container .highlight-title {
  background: #00c49c;
  color: #333;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px 4px 0 0;
}
 
.article-container .keypoints-header {
  background: #8ba2e8;
  color: #fff;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px 4px 0 0;
}
.article-container .highlight-box {
  background: #ecfffb;          /* restore background */
  border-left: 5px solid #00c49c; /* restore accent */
  padding: 12px;
  margin: 12px 0;
  border-radius: 6px;
}
 
.article-container .keypoints-float {
  background: #fff8e6;
  border-left: 4px solid #8ba2e8;
  padding: 14px;
  border-radius: 6px;
}
 
.article-container .highlight-title {
  color: #1f2937;
}
 
.article-container .keypoints-header {
  color: #ffffff;
}
 
/*RESPONSIVE*/
 
@media (max-width: 900px) {
 
  .article-container .content-wrapper {
     flex-direction: column;
  }
 
  .article-container .right-sidebar {
    max-width: 100%;
  }
 
.article-container figure {
  display: block;
  max-width: 100%;
}
 
/*ACCESSIBILITY (keep minimal)*/
 
a:focus-visible,
button:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}
 
/*AUTHOR*/
 
.author-infobox {
  border: 1px solid #ccc;
  padding: 10px;
  max-width: 250px;
}
}

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