MediaWiki:Common.css
From AbhiprayaVedi
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/*BASE TYPOGRAPHY*/
:lang(en) {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
:lang(ml) {
font-family: 'Manjari', 'Meera', 'Rachana', 'AnjaliOldLipi', 'Noto Sans Malayalam', sans-serif;
line-height: 1.75;
}
body {
font-size: 17px;
}
/*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 .image-left {
float: left;
margin: 0 12px 8px 0;
width: auto; /* critical */
max-width: none; /* remove constraint */
}
/* FIGURE = single source of truth */
.article-container figure[typeof~='mw:File/Thumb'],
.article-container figure[typeof~='mw:File/Frame'] {
display: block;
width: fit-content;
margin: 0;
}
/* Make anchor behave correctly */
.article-container figure > a {
display: block;
}
/* Image */
.article-container figure img {
display: block;
width: auto; /* IMPORTANT: NOT 100% */
max-width: 100%; /* prevents overflow */
}
/* Caption */
.article-container figure figcaption {
display: block;
width: 100%;
box-sizing: border-box;
margin-top: 6px;
white-space: normal;
overflow-wrap: break-word;
word-break: normal;
}
/*SIMPLE CONTENT LAYOUT*/
.article-container .content-wrapper {
display: flex;
gap: 24px;
align-items: flex-start;
}
.article-container .main-content {
flex: 1 1 0;
min-width: 0;
}
.article-container .right-sidebar {
flex: 0 0 260px; /* fixed width column */
}
/*AUTHOR BLOCK (cleaned)*/
.article-container .article-header {
background: #C7D2FE;
text-align: center;
padding: 4px 0;
}
.article-container .author-info {
display: flex;
justify-content: center;
align-items: center;
gap: 6px;
font-size: 1em;
color: #444;
}
.article-container .author-info span:not(:last-child)::after {
content: "•";
margin-left: 6px;
color: #999;
}
.article-container .author-name {
font-weight: 600;
}
.article-container .date-info {
font-size: 0.9em;
color: #666;
}
/*INTRO BLOCK*/
.article-container .introduction-section {
background: #f5f7fa;
border-left: 4px solid #4a6edb;
padding: 10px 14px;
margin-bottom: 14px;
border-radius: 4px;
line-height: 1.6;
}
/*SIDEBAR (Author Image)*/
.article-container .author-infobox {
display: flex;
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;
width: fit-content;
max-width: 100%;
}
/*ACCESSIBILITY (keep minimal)*/
a:focus-visible,
button:focus-visible {
outline: 2px solid #667eea;
outline-offset: 2px;
}