MediaWiki:Common.css: Difference between revisions

From AbhiprayaVedi
No edit summary
No edit summary
Line 23: Line 23:
   ARTICLE CONTAINER
   ARTICLE CONTAINER
   ------------------------------------------------ */
   ------------------------------------------------ */
/* Scope all rules to article-container so they don't bleed */
.article-container {
.article-container {
   max-width: 1200px;
   max-width: 1200px;
Line 29: Line 28:
}
}


/* 1. Author section inline, narrow margins */
/* 1. Author section inline, narrow margins + centralisation */
.article-container .article-header {
.article-container .article-header {
   margin: 0 0 8px 0;
   margin: 4px auto;         /* reduced margin, auto centers block */
   padding: 4px 0;
   padding: 4px 0;
   border: none;
   border: none;
   background: #C7D2FE;
   background: #C7D2FE;
  text-align: center;        /* center contents */
}
}


.article-container .author-info {
.article-container .author-info {
   display: flex;
   display: flex;
  justify-content: center;  /* flex children centered */
   align-items: center;
   align-items: center;
   gap: 4px;
   gap: 8px;                 /* balanced spacing */
   font-size: 1.05em;
   font-size: 1.05em;
   color: #444;
   color: #444;
Line 52: Line 53:
   font-weight: 600;
   font-weight: 600;
}
}
.article-container .date-info {
.article-container .date-info {
   font-size: 0.9em;
   font-size: 0.9em;
   color: #666;
   color: #666;
}
}
.article-container .category-badge {
.article-container .category-badge {
   background: #e0e7ff;
   background: #e0e7ff;
Line 66: Line 65:
}
}


/* 2. Introduction section subtle block */
/* 2. Introduction section sober block */
.article-container .introduction-section {
.article-container .introduction-section {
   background: #fdfdfd;
   background: #f5f7fa;       /* subtle neutral background */
   border-left: 4px solid #4a6edb;
   border-left: 4px solid #4a6edb;
   padding: 10px 14px;
   padding: 10px 14px;
Line 77: Line 76:
   color: #222;
   color: #222;
}
}
.article-container .introduction-section p {
.article-container .introduction-section p {
   margin: 0;       /* remove default margins */
   margin: 0;
   text-indent: 0;   /* no indent */
   text-indent: 0;
}
}
/* Do NOT add indent to subsequent paragraphs — MediaWiki uses : :: for that */


/* Restore right sidebar two-column layout */
/* Restore right sidebar two-column layout */
.article-container .content-wrapper {
  display: flex;
  flex-direction: row;
  gap: 20px;
}
.article-container .main-content {
  flex: 3;
}
.article-container .article-text p:first-of-type {
  margin-top: 0;
  text-indent: 0;
  font-weight: 400;
}
.article-container .content-wrapper {
.article-container .content-wrapper {
   display: flex;
   display: flex;
Line 107: Line 88:
   gap: 24px;
   gap: 24px;
}
}
.article-container .main-content {
.article-container .main-content {
   flex: 3;
   flex: 3;
Line 113: Line 93:
}
}


/* Reset figure margins */
/* 3. Image caption limited to image width */
.article-container .image-left figure[typeof~='mw:File/Thumb'] {
  margin: 0;        /* no left or bottom margin */
  float: none;      /* cancel float:right if you want it left-aligned */
  display: block;  /* simpler layout */
}
 
/* Reset image margins inside figure */
.article-container .image-left figure[typeof~='mw:File/Thumb'] .mw-file-element {
  margin: 0;        /* remove 0.75em and 0.5em defaults */
  padding-right: 6px;    /* subtle spacing on the right */
  display: block;  /* ensures no inline spacing */
}
 
 
.article-container .image-left {
.article-container .image-left {
   float: left;             /* align left */
   float: left;
   margin: 0;               /* remove default margins */
   margin: 0;
   border: 1px solid #ccc;   /* add subtle border */
   border: 1px solid #ccc;
   padding: 0px;             /* optional padding inside border */
   padding: 0;
}
}
.article-container .image-left figure[typeof~='mw:File/Thumb'] {
.article-container .image-left figure[typeof~='mw:File/Thumb'] {
   display: inline-block;   /* figure shrinks to fit its contents */
  margin: 0;
  float: none;
   display: inline-block;     /* figure width = image width */
}
}
.article-container .image-left figure[typeof~='mw:File/Thumb'] a {
.article-container .image-left figure[typeof~='mw:File/Thumb'] a {
   display: block;         /* image link fills figure width */
   display: block;           /* image link fills figure width */
}
.article-container .image-left figure[typeof~='mw:File/Thumb'] .mw-file-element {
  margin: 0;
  padding-right: 6px;        /* subtle spacing on the right */
  display: block;
}
}
.article-container .image-left figure[typeof~='mw:File/Thumb'] figcaption {
.article-container .image-left figure[typeof~='mw:File/Thumb'] figcaption {
   display: block;         /* caption sits below */
   display: block;
   max-width: 100%;         /* never exceed image width */
   max-width: 100%;           /* never exceed image width */
   text-align: center;     /* center caption under image */
   text-align: center;
   margin-top: 6px;         /* small gap below image */
   margin-top: 6px;
   padding: 2px 4px;       /* subtle padding */
   padding: 2px 4px;
   border: none;           /* optional: remove default border */
   border: none;
   background: transparent; /* optional: remove background */
   background: transparent;
}
}
.article-container .image-left img {
.article-container .image-left img {
   display: block;
   display: block;
Line 158: Line 127:
}
}


/* 4. Author photo in sidebar */
.article-container .right-sidebar {
.article-container .right-sidebar {
   flex: 1;
   flex: 1;
   max-width: 280px;
   max-width: 280px;
}
}
.article-container .author-photo {
.article-container .author-photo {
   float: left;             /* align left in sidebar */
   margin: 0;                 /* remove top/bottom margin */
   margin: 0 0 12px 0;       /* space below */
   display: block;
   border: 1px solid #ccc;   /* match image border */
   border: 1px solid #ccc;
   padding: 2px;
   padding: 2px;
}
}
 
.article-container .author-photo figcaption {
  text-align: center;        /* caption centered */
  margin-top: 4px;          /* small gap below photo */
}
.article-container .author-infobox {
.article-container .author-infobox {
   display: flex;
   display: flex;
Line 176: Line 148:
}
}


/* 5. Key points mild background */
.article-container .keypoints-box {
  background: #f9f9f9;      /* mild neutral background */
  padding: 12px;
  border-left: 4px solid #8ba2e8;
  border-radius: 6px;
}
/* Highlight boxes */
.article-container .highlight-box {
.article-container .highlight-box {
   background: #ecfffb;
   background: #ecfffb;
Line 183: Line 164:
   border-radius: 6px;
   border-radius: 6px;
}
}
.article-container .highlight-title {
.article-container .highlight-title {
   background: #00c49c;  
   background: #00c49c;
   color: #333;
   color: #333;
   font-weight: bold;
   font-weight: bold;
Line 192: Line 172:
   margin-bottom: 6px;
   margin-bottom: 6px;
}
}
.article-container .highlight-text {
.article-container .highlight-text {
   color: #333;
   color: #333;
Line 201: Line 180:
/* Key Points header */
/* Key Points header */
.article-container .keypoints-header {
.article-container .keypoints-header {
   background: #8ba2e8;     /* blue header background */
   background: #8ba2e8;
   color: #dde4f8;
   color: #dde4f8;
   font-weight: bold;
   font-weight: bold;
Line 208: Line 187:
   margin-bottom: 6px;
   margin-bottom: 6px;
}
}


/* ------------------------------------------------
/* ------------------------------------------------
Line 223: Line 201:
   margin-bottom: 8px;
   margin-bottom: 8px;
}
}
.av-featured-image {
.av-featured-image {
   flex: 0 0 260px;
   flex: 0 0 260px;
   max-width: 260px;
   max-width: 260px;
}
}
.av-featured-image img {
.av-featured-image img {
   width: 260px;
   width: 260px;
Line 235: Line 211:
   display: block;
   display: block;
}
}
.av-featured-body {
.av-featured-body {
   flex: 1 1 auto;
   flex: 1 1 auto;
   min-width: 0;
   min-width: 0;
   display: -webkit-box;
   display: -webkit-box;
   -webkit-line-clamp: 8; /* Adjust lines */
   -webkit-line-clamp: 8;
   -webkit-box-orient: vertical;
   -webkit-box-orient: vertical;
   overflow: hidden;
   overflow: hidden;
   text-overflow: ellipsis;
   text-overflow: ellipsis;
}
}
.av-featured-title {
.av-featured-title {
   font-size: 1.45em;
   font-size: 1.45em;
Line 252: Line 226:
   margin-bottom: 10px;
   margin-bottom: 10px;
}
}
.av-featured-intro {
.av-featured-intro {
   font-size: 1.05em;
   font-size: 1.05em;
Line 271: Line 244:
   .av-latest-grid { grid-template-columns: repeat(2, 1fr); }
   .av-latest-grid { grid-template-columns: repeat(2, 1fr); }
}
}
@media (max-width: 768px) {
@media (max-width: 768px) {
   .av-featured { flex-direction: column; }
   .av-featured { flex-direction: column; }
Line 286: Line 258:
   outline-offset: 2px;
   outline-offset: 2px;
}
}
/* Hidden text for emoji headers */
.highlight-title::before {
.highlight-title::before {
   content: "Highlight ";
   content: "Highlight ";
Line 293: Line 263:
   left: -9999px;
   left: -9999px;
}
}
.keypoints-header::before {
.keypoints-header::before {
   content: "Key Points ";
   content: "Key Points ";

Revision as of 20:50, 21 April 2026

/* ================================================================
   MediaWiki:CommonTest.css
   Test stylesheet for AbhiprayaVedi
   ================================================================ */

/* ------------------------------------------------
   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
   ------------------------------------------------ */
.article-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* 1. Author section inline, narrow margins + centralisation */
.article-container .article-header {
  margin: 4px auto;          /* reduced margin, auto centers block */
  padding: 4px 0;
  border: none;
  background: #C7D2FE;
  text-align: center;        /* center contents */
}

.article-container .author-info {
  display: flex;
  justify-content: center;   /* flex children centered */
  align-items: center;
  gap: 8px;                  /* balanced spacing */
  font-size: 1.05em;
  color: #444;
}
.article-container .author-info span:not(:last-child)::after {
  content: "•";
  margin-left: 8px;
  color: #999;
}
.article-container .author-name {
  font-weight: 600;
}
.article-container .date-info {
  font-size: 0.9em;
  color: #666;
}
.article-container .category-badge {
  background: #e0e7ff;
  color: #333;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.85em;
}

/* 2. Introduction section sober block */
.article-container .introduction-section {
  background: #f5f7fa;       /* subtle neutral background */
  border-left: 4px solid #4a6edb;
  padding: 10px 14px;
  margin: 0 0 14px 0;
  border-radius: 4px;
  font-size: 1.05em;
  line-height: 1.6;
  color: #222;
}
.article-container .introduction-section p {
  margin: 0;
  text-indent: 0;
}

/* Restore right sidebar two-column layout */
.article-container .content-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
}
.article-container .main-content {
  flex: 3;
  min-width: 0;
}

/* 3. Image caption limited to image width */
.article-container .image-left {
  float: left;
  margin: 0;
  border: 1px solid #ccc;
  padding: 0;
}
.article-container .image-left figure[typeof~='mw:File/Thumb'] {
  margin: 0;
  float: none;
  display: inline-block;     /* figure width = image width */
}
.article-container .image-left figure[typeof~='mw:File/Thumb'] a {
  display: block;            /* image link fills figure width */
}
.article-container .image-left figure[typeof~='mw:File/Thumb'] .mw-file-element {
  margin: 0;
  padding-right: 6px;        /* subtle spacing on the right */
  display: block;
}
.article-container .image-left figure[typeof~='mw:File/Thumb'] figcaption {
  display: block;
  max-width: 100%;           /* never exceed image width */
  text-align: center;
  margin-top: 6px;
  padding: 2px 4px;
  border: none;
  background: transparent;
}
.article-container .image-left img {
  display: block;
  margin: 0;
}

/* 4. Author photo in sidebar */
.article-container .right-sidebar {
  flex: 1;
  max-width: 280px;
}
.article-container .author-photo {
  margin: 0;                 /* remove top/bottom margin */
  display: block;
  border: 1px solid #ccc;
  padding: 2px;
}
.article-container .author-photo figcaption {
  text-align: center;        /* caption centered */
  margin-top: 4px;           /* small gap below photo */
}
.article-container .author-infobox {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* 5. Key points mild background */
.article-container .keypoints-box {
  background: #f9f9f9;       /* mild neutral background */
  padding: 12px;
  border-left: 4px solid #8ba2e8;
  border-radius: 6px;
}

/* Highlight boxes */
.article-container .highlight-box {
  background: #ecfffb;
  border-left: 5px solid #00c49c;
  padding: 12px;
  margin: 12px 0;
  border-radius: 6px;
}
.article-container .highlight-title {
  background: #00c49c;
  color: #333;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px 4px 0 0;
  margin-bottom: 6px;
}
.article-container .highlight-text {
  color: #333;
  font-size: 0.95em;
  line-height: 1.5;
}

/* Key Points header */
.article-container .keypoints-header {
  background: #8ba2e8;
  color: #dde4f8;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px 4px 0 0;
  margin-bottom: 6px;
}

/* ------------------------------------------------
   FEATURED SECTION (Magazine Index)
   ------------------------------------------------ */
.av-featured {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: #f8f9fa;
  border-left: 5px solid #667eea;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 8px;
}
.av-featured-image {
  flex: 0 0 260px;
  max-width: 260px;
}
.av-featured-image img {
  width: 260px;
  height: auto;
  border-radius: 6px;
  display: block;
}
.av-featured-body {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.av-featured-title {
  font-size: 1.45em;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}
.av-featured-intro {
  font-size: 1.05em;
  line-height: 1.75;
  color: #495057;
  margin-bottom: 12px;
  max-height: 200px;
  overflow: hidden;
}

/* ------------------------------------------------
   RESPONSIVE BREAKPOINTS
   ------------------------------------------------ */
@media (max-width: 960px) {
  .content-wrapper { flex-direction: column; }
  .right-sidebar { max-width: 100%; }
  .av-cards-row { flex-direction: column; }
  .av-latest-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .av-featured { flex-direction: column; }
  .av-featured-image img { max-width: 100%; }
  .av-latest-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------
   ACCESSIBILITY
   ------------------------------------------------ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}
.highlight-title::before {
  content: "Highlight ";
  position: absolute;
  left: -9999px;
}
.keypoints-header::before {
  content: "Key Points ";
  position: absolute;
  left: -9999px;
}