Jump to content

MediaWiki:Common.css: Difference between revisions

From Yusupov's House
No edit summary
No edit summary
Line 3: Line 3:
   border: 1px solid #a2a9b1;
   border: 1px solid #a2a9b1;
   background: #f8f9fa;
   background: #f8f9fa;
   color: inherit;               /* use skin's text color */
   color: inherit;
   font-size: 90%;
   font-size: 90%;
   line-height: 1.4em;
   line-height: 1.4em;
   border-collapse: collapse;
   border-collapse: collapse;
}
}
table.infobox th,
table.infobox th, table.infobox td { padding: .25em .5em; vertical-align: top; }
table.infobox td {
table.infobox th { text-align: left; }
  padding: .25em .5em;
 
  vertical-align: top;
/* Title: centered, 125%, uses custom color if provided */
}
table.infobox th {
  text-align: left;
}
table.infobox th.infobox-title {
table.infobox th.infobox-title {
   text-align: center;
   text-align: center;         /* centering */
   font-size: 125%;
   font-size: 125%;           /* size */
   font-weight: bold;
   font-weight: bold;
   background: #cfe3a3;         /* tweak to taste */
   background: var(--ib-title-bg, #cfe3a3); /* uses |color= if set */
}
}


/* === Infobox (dark theme via skin toggle) ===
/* === Dark theme via skin toggle (ignore custom color) === */
  Vector/Minerva add `skin-theme-clientpref-night` on <html>
  when the user selects Dark. We override based on that. */
html.skin-theme-clientpref-night table.infobox {
html.skin-theme-clientpref-night table.infobox {
   background: #202124;
   background: #202124;
Line 31: Line 25:
   color: #e8eaed;
   color: #e8eaed;
}
}
html.skin-theme-clientpref-night table.infobox th {
html.skin-theme-clientpref-night table.infobox th { color: #e8eaed; }
  color: #e8eaed;
html.skin-theme-clientpref-night table.infobox th.infobox-title {
}
   background: #323f2b; /* fixed dark header; overrides any --ib-title-bg */
html.skin-theme-clientpref-night .infobox-title {
   background: #323f2b;         /* header tint for dark; adjust if you like */
   color: #e8eaed;
   color: #e8eaed;
}
}


/* Optional: make links inside infobox readable in dark mode */
/* Optional: link colors inside infobox in dark mode */
html.skin-theme-clientpref-night table.infobox a { color: #8ab4f8; }
html.skin-theme-clientpref-night table.infobox a { color: #8ab4f8; }
html.skin-theme-clientpref-night table.infobox a:visited { color: #c58af9; }
html.skin-theme-clientpref-night table.infobox a:visited { color: #c58af9; }

Revision as of 22:08, 1 October 2025

/* === Infobox (light theme default) === */
table.infobox {
  border: 1px solid #a2a9b1;
  background: #f8f9fa;
  color: inherit;
  font-size: 90%;
  line-height: 1.4em;
  border-collapse: collapse;
}
table.infobox th, table.infobox td { padding: .25em .5em; vertical-align: top; }
table.infobox th { text-align: left; }

/* Title: centered, 125%, uses custom color if provided */
table.infobox th.infobox-title {
  text-align: center;         /* centering */
  font-size: 125%;            /* size */
  font-weight: bold;
  background: var(--ib-title-bg, #cfe3a3); /* uses |color= if set */
}

/* === Dark theme via skin toggle (ignore custom color) === */
html.skin-theme-clientpref-night table.infobox {
  background: #202124;
  border-color: #5f6368;
  color: #e8eaed;
}
html.skin-theme-clientpref-night table.infobox th { color: #e8eaed; }
html.skin-theme-clientpref-night table.infobox th.infobox-title {
  background: #323f2b;  /* fixed dark header; overrides any --ib-title-bg */
  color: #e8eaed;
}

/* Optional: link colors inside infobox in dark mode */
html.skin-theme-clientpref-night table.infobox a { color: #8ab4f8; }
html.skin-theme-clientpref-night table.infobox a:visited { color: #c58af9; }