MediaWiki:Common.css: Difference between revisions

From AbhiprayaVedi
No edit summary
mNo edit summary
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* RESET MediaWiki thumbnail layout */
/* Load Malayalam Google Fonts */
.article-container figure[typeof~='mw:File/Thumb'],
@import url('https://fonts.googleapis.com/css2?family=Manjari:wght@400;700&family=Meera:wght@400;700&display=swap');
.article-container figure[typeof~='mw:File/Frame'] {
  display: inline-block !important;
  float: none !important;
  clear: none !important;
  margin: 0 0 1em 0 !important;
  text-align: left !important;
}
 
 
/*BASE TYPOGRAPHY*/


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


: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: 1100px;
  margin: 0 auto;
  padding: 0 12px;
}
 
.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 figure {
  display: inline-block !important;  /* override table */
}
 
.article-container figure > * {
  display: block;
  max-width: 100%;
}
 
/*MEDIAWIKI IMAGE SYSTEM (CRITICAL — FIXED)*/
 
.article-container figure img {
  display: block;
  max-width: 100%;
  height: auto;
}
 
 
 
/* Make figure shrink strictly to image width */
.article-container figure[typeof~='mw:File/Thumb'],
.article-container figure[typeof~='mw:File/Frame'] {
  display: inline-flex !important;
  flex-direction: column;
  align-items: flex-start;  /* critical */
  width: auto !important;
  max-width: 100%;
}
 
/* Ensure internal wrappers don't expand width */
.article-container figure a,
.article-container figure .mw-file-element {
  display: inline-block;
  max-width: 100%;
}
 
/* Image */
.article-container figure img {
  display: block;
  max-width: 100%;
  height: auto;
}
 
.article-container figure figcaption {
  width: 100%;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
}
}


  /* prevent vertical stacking */
/* Main Article Title (Skin H1) */
  writing-mode: horizontal-tb;
#firstHeading,
  white-space: normal;
.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 ================ */


/*SIMPLE CONTENT LAYOUT*/
body:lang(ml),
 
.mw-body:lang(ml),
.article-container .content-wrapper {
.mw-body-content:lang(ml),
  display: flex;
#content:lang(ml),
  gap: 24px;
.mw-parser-output:lang(ml),
  align-items: flex-start;
.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-container .main-content {
/* Extra force for article body */
  flex: 3;
.article-content * {
  min-width: 0;
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
}
}


.article-container .right-sidebar {
/* Malayalam Headings */
  flex: 1;
h1:lang(ml), h2:lang(ml), h3:lang(ml), h4:lang(ml) {
  max-width: 280px;
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
}
}


/*AUTHOR BLOCK (cleaned)*/
/* Force Malayalam Font on Main Article Title */
 
#firstHeading,
.article-container .article-header {
.mw-first-heading,
  background: #C7D2FE;
.firstHeading {
  text-align: center;
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
  padding: 4px 0;
    font-weight: bold !important;
}
}


.article-container .author-info {
/* Also for Malayalam in general headings */
  display: flex;
:lang(ml) h1,
  justify-content: center;
:lang(ml) h2,
  align-items: center;
:lang(ml) h3 {
  gap: 6px;
    font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
  font-size: 1em;
  color: #444;
}
}


.article-container .author-info span:not(:last-child)::after {
/* Hide top tabs (Submissions, Discussion, Edit, etc.) for anonymous users */
  content: "•";
.anon .mw-indicators,
  margin-left: 6px;
.anon #mw-content-subtitle,
  color: #999;
.anon .vector-page-toolbar,
.anon .mw-editsection,
.anon #ca-edit,
.anon #ca-edit-source,
.anon #ca-history,
.anon #ca-view {
    display: none !important;
}
}


.article-container .author-name {
/* Force Malayalam on Main Title */
  font-weight: 600;
#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;
}
}


.article-container .date-info {
/* English Title Size */
  font-size: 0.9em;
:lang(en) #firstHeading,
  color: #666;
:lang(en) .mw-first-heading {
    font-size: 2.45em !important;
}
}


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


.article-container .introduction-section {
/* വായനക്കാർ ലോഗിൻ ചെയ്തിട്ടില്ലെങ്കിൽ (Anonymous) മാത്രം ഈ സ്റ്റൈലുകൾ ബാധകമാകും */
  background: #f5f7fa;
body.user-anonymous .article-sidebar,
  border-left: 4px solid #4a6edb;
body.user-anonymous #mw-panel,
  padding: 10px 14px;
body.user-anonymous .mw-sidebar,
  margin-bottom: 14px;
body.user-anonymous #sidebar,
  border-radius: 4px;
body.user-anonymous .right-sidebar {
  line-height: 1.6;
    display: none !important; /* സൈഡ് പാനലുകൾ പൂർണ്ണമായി മറയ്ക്കുന്നു */
    width: 0 !important;
    visibility: hidden !important;
}
}


/*SIDEBAR (Author Image)*/
/*  
 
* സൈഡ് പാനൽ മറയ്ക്കുമ്പോൾ പ്രധാന ലേഖന ഭാഗം (Main Content Area)
.article-container .author-infobox {
* പേജിന്റെ മുഴുവൻ വീതിയിലേക്കും (Full Width) മനോഹരമായി വ്യാപിച്ചു നിൽക്കാൻ താഴെ പറയുന്നവ സഹായിക്കും.
  display: flex;
*/
  flex-direction: column;
body.user-anonymous #content,
  align-items: center;
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-container .author-photo {
/* ആർട്ടിക്കിൾ പേജിനുള്ളിലെ മെയിൻ കണ്ടെന്റ് ഏരിയയുടെ വീതി ക്രമീകരണം */
  border: 1px solid #ccc;
body.user-anonymous .article-main-wrapper {
  padding: 2px;
     width: 100% !important;
  max-width: 180px;
     float: none !important;
}
 
.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-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;
    width: 100%;
  }
 
 
/*ACCESSIBILITY (keep minimal)*/
 
a:focus-visible,
button:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}
}

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