MediaWiki:Common.css: Difference between revisions

From AbhiprayaVedi
No edit summary
mNo edit summary
 
(121 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* ================================================================
/* Load Malayalam Google Fonts */
  AbhiprayaVedi - Ver3 Refined Styles
@import url('https://fonts.googleapis.com/css2?family=Manjari:wght@400;700&family=Meera:wght@400;700&display=swap');
  ================================================================ */
 
/* Reduce gap between MediaWiki page title and article content */
:lang(ml),
#firstHeading {
:lang(ml) * {
     margin-bottom: 6px !important;
     font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
    padding-bottom: 4px !important;
}
}


#bodyContent {
/* Hide namespace subtitle for published articles */
     margin-top: 8px !important;
.mw-displaytitle-subtitle {
     display: none !important;
}
}


 
/* Global minor tweaks only */
/* Base Font Size */
body {
body {
    font-size: 17px;
  line-height: 1.7;
}
 
#content {
    font-size: 1.1em;
}
 
/* ================================================================
  ARTICLE CONTAINER
  ================================================================ */
 
.article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.05em;
}
 
/* Malayalam Font Support */
.article-container[data-language="Malayalam"] {
    font-family: 'Manjari', 'Meera', 'Rachana', 'AnjaliOldLipi', 'Noto Sans Malayalam', sans-serif;
    line-height: 1.75;        /* FIX: Reduced from 2 — less stretched for Malayalam */
}
 
/* ================================================================
  HEADER - Compact, Author | Date | Category properly spread
  ================================================================ */
 
.article-header {
    background: #f8f9fa;
    border-bottom: 2px solid #495057;
    padding: 6px 16px;        /* FIX: Further reduced padding (was 10px 20px) */
    margin-bottom: 10px;      /* FIX: Tighter gap before introduction */
    border-radius: 6px;
}
 
.author-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 1.1em;
}
 
.author-name {
    font-weight: 700;
    font-size: 1.3em;
    color: #212529;
    flex: 0 0 auto;
}
 
.date-info {
    color: #6c757d;
    font-size: 1.05em;
    flex: 1 1 auto;
    text-align: center;      /* Centered between author and category */
}
 
.category-badge {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.88em;
    font-weight: 600;
    flex: 0 0 auto;
}
 
/* ================================================================
  INTRODUCTION - Reduced Padding
  ================================================================ */
 
.introduction-section {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-left: 5px solid #f59e0b;
    padding: 10px 16px;      /* FIX: Further reduced from 15px 20px */
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 1.12em;
    line-height: 1.65;        /* FIX: Reduced line-height */
    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;
    line-height: 1.85;        /* FIX: Slightly reduced from 1.9 */
    color: #212529;
    text-align: left;        /* FIX: Changed from justify — no unnatural stretching */
}
 
.article-text p {
    margin-bottom: 1.2em;    /* FIX: Slightly tighter paragraph spacing */
}
 
.article-text h2 {
    font-size: 1.6em;
    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;
    margin-top: 1.3em;
    margin-bottom: 0.7em;
    color: #495057;
}
 
/* ================================================================
  IMAGES - Reduced bottom margins
  ================================================================ */
 
.image-left {
    float: left;
    margin: 0 20px 8px 0;    /* FIX: Bottom margin reduced from 20px to 8px */
    max-width: 420px;
}
 
.image-left .thumb {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}
}


.content-image {
/* Main Article Title (Skin H1) */
     margin: 15px 0 8px 0;    /* FIX: Reduced bottom margin from 30px to 8px */
#firstHeading,
     clear: both;
.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 ================ */


/* FIX: Reduce bottom margin on all MediaWiki thumb wrappers */
body:lang(ml),
.thumb {
.mw-body:lang(ml),
     margin-bottom: 6px !important;
.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;
}
}


.thumbinner {
/* Extra force for article body */
     padding-bottom: 4px !important;
.article-content * {
     font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
}
}


.thumbcaption {
/* Malayalam Headings */
     font-size: 0.95em !important;
h1:lang(ml), h2:lang(ml), h3:lang(ml), h4:lang(ml) {
    line-height: 1.45 !important;
     font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
    padding: 5px 6px !important;  /* FIX: Less padding below caption */
}
}


/* ================================================================
/* Force Malayalam Font on Main Article Title */
  AUTHOR INFOBOX
#firstHeading,
  ================================================================ */
.mw-first-heading,
 
.firstHeading {
.author-infobox {
     font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
     background: #f8f9fa;
     font-weight: bold !important;
    border: 1px solid #ced4da;
    border-radius: 8px;
     margin-bottom: 20px;
    overflow: hidden;
}
}


.author-photo {
/* Also for Malayalam in general headings */
    text-align: center;
:lang(ml) h1,
    padding: 12px;            /* FIX: Slightly tighter */
:lang(ml) h2,
    background: white;
:lang(ml) h3 {
     border-bottom: 1px solid #dee2e6;
     font-family: 'Manjari', 'Meera', 'Rachana', 'Noto Sans Malayalam', sans-serif !important;
}
}


.author-photo img {
/* Hide top tabs (Submissions, Discussion, Edit, etc.) for anonymous users */
    max-width: 100%;
.anon .mw-indicators,
    height: auto;
.anon #mw-content-subtitle,
     border-radius: 6px;
.anon .vector-page-toolbar,
.anon .mw-editsection,
.anon #ca-edit,
.anon #ca-edit-source,
.anon #ca-history,
.anon #ca-view {
     display: none !important;
}
}


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


.author-name-box a {
/* English Title Size */
     color: #0056b3;
:lang(en) #firstHeading,
    text-decoration: none;
:lang(en) .mw-first-heading {
     font-size: 2.45em !important;
}
}


.author-name-box a:hover {
/* ================ HIDE SIDE PANELS FOR ANONYMOUS USERS ================ */
    text-decoration: underline;
}


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


/* ================================================================
/*  
  HIGHLIGHTS - Icon Only, with bottom margin for separation
* സൈഡ് പാനൽ മറയ്ക്കുമ്പോൾ പ്രധാന ലേഖന ഭാഗം (Main Content Area)
  ================================================================ */
* പേജിന്റെ മുഴുവൻ വീതിയിലേക്കും (Full Width) മനോഹരമായി വ്യാപിച്ചു നിൽക്കാൻ താഴെ പറയുന്നവ സഹായിക്കും.
 
*/
.highlight-box {
body.user-anonymous #content,
    background: #d4edda;
body.user-anonymous #mw-content-text,
    border: 1px solid #c3e6cb;
body.user-anonymous .article-content,
    border-left: 4px solid #28a745;
body.user-anonymous .mw-body {
    border-radius: 6px;
     margin-left: 0 !important;
    margin-bottom: 12px;      /* FIX: Was 15px — slightly tighter but still separated */
     margin-right: 0 !important;
    overflow: hidden;
     width: 100% !important;
}
     max-width: 100% !important;
 
.highlight-title {
    background: #28a745;
    color: white;
    padding: 7px 14px;
    font-size: 1.3em;
    text-align: center;
}
 
.highlight-text {
    padding: 12px 14px;      /* FIX: Slightly tighter */
    font-size: 1em;
    line-height: 1.65;
    color: #155724;
}
 
/* ================================================================
  KEY POINTS - Separation between items
  ================================================================ */
 
.keypoints-float {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}
 
.keypoints-header {
    background: #ffc107;
    color: #212529;
    padding: 7px 14px;
    font-size: 1.3em;
    text-align: center;
}
 
.keypoints-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
 
.keypoints-list li {
    padding: 11px 14px 11px 30px;
    border-bottom: 1px solid #ffeaa7;
    position: relative;
    font-size: 1em;
    line-height: 1.6;
    color: #856404;
}
 
/* FIX: Extra spacing between first two key points for visual separation */
.keypoints-list li:nth-child(1) {
    margin-bottom: 4px;      /* FIX: Small gap between KP1 and KP2 */
}
 
.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: 12px 16px;
    margin: 20px 0;
    border-radius: 6px;
    font-size: 1em;
    line-height: 1.65;
    color: #0c5460;
}
 
.source-attribution a {
    color: #0056b3;
    text-decoration: underline;
}
 
/* ================================================================
  MODERN STYLE ALTERNATIVES
  ================================================================ */
 
.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;
}
 
.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;
}
 
.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;
}
 
/* ================================================================
  MOBILE RESPONSIVE
  ================================================================ */
 
@media (max-width: 768px) {
    .author-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
     }
    .date-info {
        text-align: left;
    }
    .category-badge {
        align-self: flex-start;
    }
}
 
/* ================================================================
  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-name,
    .category-badge {
        color: #000 !important;
    }
}
 
/* ================================================================
  ACCESSIBILITY
  ================================================================ */
 
a:focus,
button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
}


@media (prefers-contrast: high) {
/* ആർട്ടിക്കിൾ പേജിനുള്ളിലെ മെയിൻ കണ്ടെന്റ് ഏരിയയുടെ വീതി ക്രമീകരണം */
    .article-container {
body.user-anonymous .article-main-wrapper {
        border: 2px solid currentColor;
    width: 100% !important;
     }
     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;
}