Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Infobox/styles/citizen.css: Difference between revisions

From Shadowrun Wiki
 
No edit summary
 
Line 1: Line 1:
/* {{pp|small=y}} */
/* Citizen-compatible Infobox TemplateStyles (no explicit dark selectors needed) */
/*
* Citizen-compatible Infobox TemplateStyles
* Uses CSS variables safely within TemplateStyles limits.
* Avoids hardcoded colors to adapt automatically to Citizen's color scheme.
*/


.infobox {
.infobox {
/* TemplateStyles-safe fallback shadow */
  /* subtle shadow */
box-shadow: 0.2em 0.2em 1em 0 rgba(0, 0, 0, 0.2);
  box-shadow: 0.2em 0.2em 1em 0 rgba(0,0,0,0.2);


float: right;
  float: right;
clear: right;
  clear: right;
margin: 0 0 1em 1em;
  margin: 0 0 1em 1em;
padding: 0.5em;
  padding: 0.5em;
width: 280px;
  width: 280px;


/* Use allowed variable-based colors (with fallbacks) */
  /* Use Citizen tokens so colors flip in dark mode */
background-color: var(--theme-surface-1, #f9f9f9);
  background-color: var(--color-surface-0, #f9f9f9);
color: var(--theme-text-color, #000);
  color: var(--color-base, #000);
border: 1px solid var(--theme-border-color, #aaa);
  border: 1px solid var(--border-color-base, #aaa);


font-size: 90%;
  font-size: 90%;
  border-radius: 4px;
}


/* Fixed radius, since TemplateStyles rejects var() in border-radius */
.infobox a { color: inherit; }
border-radius: 4px;
}


/* Subboxes (child infoboxes nested in another infobox) */
.infobox-subbox {
.infobox-subbox {
padding: 0;
  padding: 0;
border: none;
  border: none;
margin: -3px;
  margin: -3px;
width: auto;
  width: auto;
min-width: 100%;
  min-width: 100%;
font-size: 100%;
  font-size: 100%;
clear: none;
  clear: none;
float: none;
  float: none;
background-color: transparent;
  background-color: transparent;
}
}


.infobox-3cols-child {
.infobox-3cols-child { margin: auto; }
margin: auto;
.infobox .navbar { font-size: 100%; }
}
 
.infobox .navbar {
font-size: 100%;
}


.infobox th {
.infobox th {
text-align: left;
  text-align: left;
vertical-align: top;
  vertical-align: top;
padding-right: 0.5em;
  padding-right: 0.5em;
color: var(--theme-text-color, #000);
  color: var(--color-base, #000);
}
}


.infobox td {
.infobox td {
vertical-align: top;
  vertical-align: top;
color: var(--theme-text-color, #000);
  color: var(--color-base, #000);
}
}


/* Header rows */
/* Header rows */
.infobox .infobox-header {
.infobox .infobox-header {
background-color: var(--theme-surface-2, #e0e0e0);
  background-color: var(--color-surface-1, #e0e0e0);
color: var(--theme-text-color, #000);
  color: var(--color-base, #000);
font-weight: bold;
  font-weight: bold;
text-align: center;
  text-align: center;
padding: 0.4em 0;
  padding: 0.4em 0;
font-size: 105%;
  font-size: 105%;
border-bottom: 1px solid var(--theme-border-color, #aaa);
  border-bottom: 1px solid var(--border-color-base, #aaa);
}
}


/* Optional dark mode tweaks */
/* Optional: soft zebra striping that adapts to theme */
.skin-citizen-dark .infobox {
.infobox tr:nth-child(even) > td {
box-shadow: 0.2em 0.2em 1em 0 rgba(0, 0, 0, 0.6);
  background-color: var(--color-surface-1, #f0f0f0);
}
}


.skin-citizen-dark .infobox .infobox-header {
/* Slightly stronger shadow in dark mode, without hardcoding colors */
border-bottom-color: var(--theme-border-strong, #444);
.skin-citizen [data-theme="dark"] .infobox,
.skin-citizen.theme-dark .infobox {
  box-shadow: 0.2em 0.2em 1em 0 rgba(0,0,0,0.6);
}
}

Latest revision as of 08:15, 23 October 2025

/* Citizen-compatible Infobox TemplateStyles (no explicit dark selectors needed) */

.infobox {
  /* subtle shadow */
  box-shadow: 0.2em 0.2em 1em 0 rgba(0,0,0,0.2);

  float: right;
  clear: right;
  margin: 0 0 1em 1em;
  padding: 0.5em;
  width: 280px;

  /* Use Citizen tokens so colors flip in dark mode */
  background-color: var(--color-surface-0, #f9f9f9);
  color: var(--color-base, #000);
  border: 1px solid var(--border-color-base, #aaa);

  font-size: 90%;
  border-radius: 4px;
}

.infobox a { color: inherit; }

.infobox-subbox {
  padding: 0;
  border: none;
  margin: -3px;
  width: auto;
  min-width: 100%;
  font-size: 100%;
  clear: none;
  float: none;
  background-color: transparent;
}

.infobox-3cols-child { margin: auto; }
.infobox .navbar { font-size: 100%; }

.infobox th {
  text-align: left;
  vertical-align: top;
  padding-right: 0.5em;
  color: var(--color-base, #000);
}

.infobox td {
  vertical-align: top;
  color: var(--color-base, #000);
}

/* Header rows */
.infobox .infobox-header {
  background-color: var(--color-surface-1, #e0e0e0);
  color: var(--color-base, #000);
  font-weight: bold;
  text-align: center;
  padding: 0.4em 0;
  font-size: 105%;
  border-bottom: 1px solid var(--border-color-base, #aaa);
}

/* Optional: soft zebra striping that adapts to theme */
.infobox tr:nth-child(even) > td {
  background-color: var(--color-surface-1, #f0f0f0);
}

/* Slightly stronger shadow in dark mode, without hardcoding colors */
.skin-citizen [data-theme="dark"] .infobox,
.skin-citizen.theme-dark .infobox {
  box-shadow: 0.2em 0.2em 1em 0 rgba(0,0,0,0.6);
}