MediaWiki:Common.css: Difference between revisions

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


/* Base Font Size Increase */
:lang(ml),
body {
:lang(ml) * {
     font-size: 16px; /* Increased from default 14px */
     font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
}
}


#content {
/* Hide namespace subtitle for published articles */
     font-size: 1.1em; /* Makes all content 17.6px */
.mw-displaytitle-subtitle {
     display: none !important;
}
}


/* ================================================================
/* Global minor tweaks only */
  ARTICLE CONTAINER
body {
  ================================================================ */
  line-height: 1.7;
 
.article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.05em; /* 18.48px */
}
 
/* Malayalam Font Support */
.article-container[data-language="Malayalam"] {
    font-family: 'Manjari', 'Meera', 'Rachana', 'AnjaliOldLipi', 'Noto Sans Malayalam', sans-serif;
    line-height: 2; /* More line height for Malayalam */
}
 
/* ================================================================
  HEADER - Compact, Author Prominent
  ================================================================ */
 
.article-header {
    background: # f8f8f2;
    border-bottom: 2px solid #495057;
    padding: 15px 15px;
    margin-bottom: 2px;
    border-radius: 6px 6px 0 0;
}
 
.author-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 1.1em; /* 20.3px */
}
 
.author-name {
    font-weight: 700;
    font-size: 1.4em; /* 28.4px - PROMINENT */
    color: #212529;
}
 
.date-info {
    color: #6c757d;
    font-size: 1em;
}
 
.category-badge {
    background: #667eea;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}
 
/* ================================================================
  INTRODUCTION - Prominent but Compact
  ================================================================ */
 
.introduction-section {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-left: 5px solid #f59e0b;
    padding: 20px 25px;
    margin-bottom: 25px;
    border-radius: 0 0 6px 6px;
    font-size: 1.15em; /* 21.3px */
    line-height: 1.7;
    color: #78350f;
    font-weight: 500;
}
 
/* ================================================================
  CONTENT LAYOUT
  ================================================================ */
 
.content-wrapper {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}
 
.main-content {
    flex: 1 1 70%;
    min-width: 0;
}
 
.right-sidebar {
    flex: 0 0 300px;
}
 
@media (max-width: 968px) {
    .content-wrapper {
        flex-direction: column;
    }
   
    .right-sidebar {
        flex: 1 1 auto;
        max-width: 100%;
    }
}
 
/* ================================================================
  ARTICLE TEXT
  ================================================================ */
 
.article-text {
    font-size: 1.15em; /* 21.3px - LARGER */
    line-height: 1.9;
    color: #212529;
    text-align: justify;
}
 
.article-text p {
    margin-bottom: 1.3em;
}
 
/* Headings in Article */
.article-text h2 {
    font-size: 1.6em; /* 34px */
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    color: #212529;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.3em;
}
 
.article-text h3 {
    font-size: 1.3em; /* 27.7px */
    margin-top: 1.3em;
    margin-bottom: 0.7em;
    color: #495057;
}
 
/* ================================================================
  IMAGES
  ================================================================ */
 
.image-left {
    float: left;
    margin: 0 25px 20px 0;
    max-width: 420px;
}
 
.image-left .thumb {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}
 
.content-image {
    margin: 30px 0;
    clear: both;
}
}


/* Image Captions - Larger */
/* Main Article Title (Skin H1) */
.thumbcaption {
#firstHeading,
     font-size: 0.95em !important; /* Larger captions */
.mw-first-heading {
     line-height: 1.5 !important;
     font-size: 2.4em !important;
     padding: 8px !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),
  AUTHOR INFOBOX
.mw-body:lang(ml),
  ================================================================ */
.mw-body-content:lang(ml),
 
#content:lang(ml),
.author-infobox {
.mw-parser-output:lang(ml),
    background: #f8f9fa;
.article-content:lang(ml),
    border: 1px solid #ced4da;
.intro-box:lang(ml),
    border-radius: 8px;
p:lang(ml),
     margin-bottom: 20px;
span:lang(ml),
     overflow: hidden;
div:lang(ml) {
     font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', 'Nirmala UI', sans-serif !important;
     line-height: 1.85 !important;
}
}


.author-photo {
/* Extra force for article body */
     text-align: center;
.article-content * {
    padding: 15px;
     font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
    background: white;
    border-bottom: 1px solid #dee2e6;
}
}


.author-photo img {
/* Malayalam Headings */
    max-width: 100%;
h1:lang(ml), h2:lang(ml), h3:lang(ml), h4:lang(ml) {
    height: auto;
     font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
     border-radius: 6px;
}
}


.author-name-box {
/* Force Malayalam Font on Main Article Title */
     text-align: center;
#firstHeading,
    padding: 15px;
.mw-first-heading,
    font-size: 1.2em; /* 22.2px */
.firstHeading {
     font-weight: 700;
     font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
    color: #212529;
     font-weight: bold !important;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}
}


.author-name-box a {
/* Also for Malayalam in general headings */
    color: #0056b3;
:lang(ml) h1,
     text-decoration: none;
:lang(ml) h2,
:lang(ml) h3 {
     font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
}
}


.author-name-box a:hover {
/* Hide top tabs (Submissions, Discussion, Edit, etc.) for anonymous users */
     text-decoration: underline;
.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;
}
}


.author-bio {
/* Force Malayalam on Main Title */
     padding: 15px;
#firstHeading,
     font-size: 1em; /* 18.5px */
.mw-first-heading,
     line-height: 1.7;
.firstHeading {
    color: #495057;
     font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
     font-size: 2.35em !important;
     font-weight: 700 !important;
}
}


/* ================================================================
/* English Title Size */
  HIGHLIGHTS
:lang(en) #firstHeading,
  ================================================================ */
:lang(en) .mw-first-heading {
 
     font-size: 2.45em !important;
.highlight-box {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #28a745;
    border-radius: 6px;
     margin-bottom: 15px;
    overflow: hidden;
}
}


.highlight-title {
/* ================ HIDE SIDE PANELS FOR ANONYMOUS USERS ================ */
    background: #28a745;
    color: white;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 1em;
}


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


/* ================================================================
/*  
  KEY POINTS - Floating Box in Sidebar
* സൈഡ് പാനൽ മറയ്ക്കുമ്പോൾ പ്രധാന ലേഖന ഭാഗം (Main Content Area)
  ================================================================ */
* പേജിന്റെ മുഴുവൻ വീതിയിലേക്കും (Full Width) മനോഹരമായി വ്യാപിച്ചു നിൽക്കാൻ താഴെ പറയുന്നവ സഹായിക്കും.
 
*/
.keypoints-float {
body.user-anonymous #content,
    background: #fff3cd;
body.user-anonymous #mw-content-text,
    border: 1px solid #ffc107;
body.user-anonymous .article-content,
    border-radius: 6px;
body.user-anonymous .mw-body {
    overflow: hidden;
     margin-left: 0 !important;
    margin-bottom: 20px;
     margin-right: 0 !important;
}
     width: 100% !important;
 
     max-width: 100% !important;
.keypoints-header {
    background: #ffc107;
    color: #212529;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 1em;
}
 
.keypoints-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
 
.keypoints-list li {
    padding: 12px 14px;
    border-bottom: 1px solid #ffeaa7;
    position: relative;
    padding-left: 30px;
    font-size: 1em; /* 18.5px */
    line-height: 1.6;
    color: #856404;
}
 
.keypoints-list li:last-child {
    border-bottom: none;
}
 
.keypoints-list li:before {
    content: "▸";
    position: absolute;
    left: 12px;
    color: #f59e0b;
    font-weight: bold;
    font-size: 1.1em;
}
 
/* ================================================================
  SOURCE ATTRIBUTION
  ================================================================ */
 
.source-attribution {
    background: #e7f3ff;
    border: 1px solid #bee5eb;
    border-left: 4px solid #17a2b8;
    padding: 15px 18px;
    margin: 25px 0;
    border-radius: 6px;
    font-size: 1em; /* 18.5px */
    line-height: 1.7;
    color: #0c5460;
}
 
.source-attribution a {
    color: #0056b3;
    text-decoration: underline;
}
 
/* ================================================================
  MODERN STYLE ALTERNATIVES
  ================================================================ */
 
/* Alternative 1: Card Style */
.article-container.style-card .article-header {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: none;
    border-left: 5px solid #667eea;
}
 
/* Alternative 2: Gradient Header */
.article-container.style-gradient .article-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}
 
.article-container.style-gradient .author-info,
.article-container.style-gradient .author-name,
.article-container.style-gradient .date-info {
    color: white;
}
 
.article-container.style-gradient .category-badge {
    background: rgba(255,255,255,0.3);
    border: 1px solid white;
}
 
/* Alternative 3: Minimal Style */
.article-container.style-minimal .article-header {
     background: transparent;
    border-bottom: 3px solid #212529;
    border-radius: 0;
}
 
.article-container.style-minimal .introduction-section {
     background: transparent;
    border-left: 5px solid #ffc107;
    border-radius: 0;
}
 
/* ================================================================
  PRINT STYLES
  ================================================================ */
 
@media print {
     .article-container {
        max-width: 100%;
        font-size: 12pt;
     }
   
    .content-wrapper {
        display: block;
    }
   
    .right-sidebar {
        float: right;
        width: 250px;
        margin-left: 20px;
    }
   
    .author-header,
    .category-badge {
        color: #000 !important;
    }
}
 
/* ================================================================
  ACCESSIBILITY
  ================================================================ */
 
/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
}


/* High contrast mode support */
/* ആർട്ടിക്കിൾ പേജിനുള്ളിലെ മെയിൻ കണ്ടെന്റ് ഏരിയയുടെ വീതി ക്രമീകരണം */
@media (prefers-contrast: high) {
body.user-anonymous .article-main-wrapper {
    .article-container {
    width: 100% !important;
        border: 2px solid currentColor;
     float: none !important;
     }
   
    .article-header {
        border-bottom: 3px solid currentColor;
    }
}
}

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