MediaWiki:Common.css: Difference between revisions
From AbhiprayaVedi
No edit summary |
No edit summary |
||
| Line 5: | Line 5: | ||
float: none !important; | float: none !important; | ||
clear: none !important; | clear: none !important; | ||
text-align: left !important; | text-align: left !important; | ||
} | } | ||
| Line 82: | Line 81: | ||
.article-container .image-left { | .article-container .image-left { | ||
float: left; | float: left; | ||
margin: 0 12px 8px 0; /* only right + bottom */ | |||
max-width: 45%; | max-width: 45%; | ||
} | } | ||
.article-container .image-left figure { | .article-container .image-left figure { | ||
display: block; | display: block; | ||
max-width: 100%; | max-width: 100%; | ||
| Line 99: | Line 93: | ||
.article-container figure[typeof~='mw:File/Thumb'], | .article-container figure[typeof~='mw:File/Thumb'], | ||
.article-container figure[typeof~='mw:File/Frame'] { | .article-container figure[typeof~='mw:File/Frame'] { | ||
margin: 0 !important; | |||
display: inline-block; | |||
max-width: 100%; | max-width: 100%; | ||
} | } | ||
| Line 115: | Line 110: | ||
max-width: 100%; | max-width: 100%; | ||
height: auto; | height: auto; | ||
margin: 0; | |||
padding: 0; | |||
border: none; | |||
} | } | ||
Revision as of 20:31, 24 April 2026
/* 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;
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: 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 figure {
width: fit-content;
}
.article-container .main-content::after {
content: "";
display: block;
clear: both;
}
/*MEDIAWIKI IMAGE SYSTEM (CRITICAL — FIXED)*/
.article-container .image-left {
float: left;
margin: 0 12px 8px 0; /* only right + bottom */
max-width: 45%;
}
.article-container .image-left figure {
display: block;
max-width: 100%;
}
/* Make figure shrink strictly to image width */
.article-container figure[typeof~='mw:File/Thumb'],
.article-container figure[typeof~='mw:File/Frame'] {
margin: 0 !important;
display: inline-block;
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;
margin: 0;
padding: 0;
border: none;
}
.article-container figure figcaption {
display: block;
width: 100%;
white-space: normal;
overflow-wrap: break-word;
word-break: normal;
margin-top: 6px;
}
/*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; /* change from inline-block */
width: fit-content; /* shrink to image width */
max-width: 100%;
}
/*ACCESSIBILITY (keep minimal)*/
a:focus-visible,
button:focus-visible {
outline: 2px solid #667eea;
outline-offset: 2px;
}