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.
/* RESET MediaWiki thumbnail layout */
.article-container figure[typeof~='mw:File/Thumb'],
.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;
}
.article-container figure[typeof~='mw:File/Thumb'] {
display: inline-block;
max-width: 100%;
}
/*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: 1100px;
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 figure {
display: inline-block !important; /* override table */
}
.article-container figure > * {
display: block;
max-width: 100%;
}
/*MEDIAWIKI IMAGE SYSTEM (CRITICAL — FIXED)*/
.article-container .image-left {
display: block;
max-width: 100%;
overflow: hidden;
}
.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 {
display: block;
max-width: 100%;
width: 100%;
box-sizing: border-box;
white-space: normal;
overflow-wrap: break-word;
word-break: break-word;
}
/* prevent vertical stacking */
writing-mode: horizontal-tb;
white-space: normal;
}
/*SIMPLE CONTENT LAYOUT*/
.article-container .content-wrapper {
display: flex;
gap: 24px;
align-items: flex-start;
}
.article-container .main-content {
flex: 3;
min-width: 0;
}
.article-container .right-sidebar {
flex: 1;
max-width: 280px;
}
/*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: 100%;
}
/*ACCESSIBILITY (keep minimal)*/
a:focus-visible,
button:focus-visible {
outline: 2px solid #667eea;
outline-offset: 2px;
}