Jump to content

Module:Infobox/styles.css: Difference between revisions

From Mii Technical Wiki
 
No edit summary
Line 1: Line 1:
/* {{pp|small=y}} */
/**
/*
  * Common TemplateStyles used by [[Template:Extension]], [[Template:Skin]],
  * This TemplateStyles sheet deliberately does NOT include the full set of
  * [[Template:Tool]], etc.
* infobox styles. We are still working to migrate all of the manual
  * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]]
* DO NOT ADD THEM HERE
  */
  */
/*
.infobox {
* not strictly certain these styles are necessary since the modules now
box-sizing: border-box;
* exclusively output infobox-subbox or infobox, not both
border: 2px solid var( --border-color-base, #a2a9b1 );
* just replicating the module faithfully
width: 280px;
*/
border-collapse: collapse;
.infobox-subbox {
border-spacing: 0;
padding: 0;
background-color: white;
border: none;
color: #333;
margin: -3px;
/* these are overriden by .infobox-rtl on the templates of interest */
width: auto;
/* @noflip */
min-width: 100%;
clear: right;
font-size: 100%;
/* @noflip */
clear: none;
float: right;
float: none;
/* @noflip */
background-color: transparent;
margin: 0 0 0.5em 0.5em;
}
}


.infobox-3cols-child {
.infobox-rtl {
margin: auto;
/* @noflip */
clear: left;
/* @noflip */
float: left;
/* @noflip */
margin: 0 0.5em 0.5em 0;
}
}


.infobox .navbar {
.infobox th {
font-size: 100%;
/* @noflip */
text-align: left;
padding: 0.2em 0.5em;
vertical-align: top;
}
}


/* Dark theme: [[William_Wragg]], [[Coral_Castle]] */
.infobox-rtl th {
/* @noflip */
text-align: right;
}


@media screen {
@media (max-width: 719px) {
    html.skin-theme-clientpref-night .infobox-full-data:not(.notheme) > div:not(.notheme)[style] {
/* high specificity to ensure specific infoboxes won't override these
    background: #1f1f23 !important;
* properties with their own tstyles inadvertently */
      /* switch with var( --color-base ) when supported. */
body.mediawiki .infobox {
      color: #f8f9fa;
float: none;
clear: both;
width: 100%;
margin: 0 0 .5em 0;
}
}
}
}


.infobox td {
border: none;
padding: 0.2em 0.5em;
vertical-align: top;
}
.infobox-header {
background-color: #a2a9b1;
color: #FFF;
text-align: left;
}


@media screen and ( prefers-color-scheme: dark) {
.infobox-header a {
    html.skin-theme-clientpref-os .infobox-full-data:not(.notheme) > div:not(.notheme)[style] {
color: #FFF;
      background: #1f1f23 !important;
      /* switch with var( --color-base ) when supported. */
      color: #f8f9fa;
    }
}
}


.infobox-header td,
.infobox-header th {
padding: 0.5em 0.5em;
}
.infobox-header img {
padding: 0 0.2em 0 0.5em;
}
@media screen {
html.skin-theme-clientpref-night .infobox {
background-color: inherit;
color: inherit;
}
}


/* Since infobox is a table, many infobox templates take advantage of this to
@media screen and (prefers-color-scheme: dark) {
* add columns and rows to the infobox itself rather than as part of a new table
   html.skin-theme-clientpref-os .infobox {
* inside them. This class should be discouraged and removed on the long term,
background-color: inherit;
* but allows us to at least identify these tables going forward
color: inherit;
* Currently in use on: [[Module:Infobox3cols]]
* Fixes issue described in [[phab:F55300125]] on Vector 2022.
*/
@media (min-width: 640px) {
   body.skin--responsive .infobox-table {
    display: table !important;
  }
  body.skin--responsive .infobox-table > caption {
    display: table-caption !important;
  }
  body.skin--responsive .infobox-table > tbody {
    display: table-row-group;
  }
  body.skin--responsive .infobox-table th,
  body.skin--responsive .infobox-table td {
    padding-left: inherit;
    padding-right: inherit;
   }
   }
}
}

Revision as of 19:02, 6 August 2025

/**
 * Common TemplateStyles used by [[Template:Extension]], [[Template:Skin]],
 * [[Template:Tool]], etc.
 */
.infobox {
	box-sizing: border-box;
	border: 2px solid var( --border-color-base, #a2a9b1 );
	width: 280px;
	border-collapse: collapse;
	border-spacing: 0;
	background-color: white;
	color: #333;
	/* these are overriden by .infobox-rtl on the templates of interest */
	/* @noflip */
	clear: right;
	/* @noflip */
	float: right;
	/* @noflip */
	margin: 0 0 0.5em 0.5em;
}

.infobox-rtl {
	/* @noflip */
	clear: left;
	/* @noflip */
	float: left;
	/* @noflip */
	margin: 0 0.5em 0.5em 0;
}

.infobox th {
	/* @noflip */
	text-align: left;
	padding: 0.2em 0.5em;
	vertical-align: top;
}

.infobox-rtl th {
	/* @noflip */
	text-align: right;
}

@media (max-width: 719px) {
	/* high specificity to ensure specific infoboxes won't override these
	 * properties with their own tstyles inadvertently */
	body.mediawiki .infobox {
		float: none;
		clear: both;
		width: 100%;
		margin: 0 0 .5em 0;
	}
}

.infobox td {
	border: none;
	padding: 0.2em 0.5em;
	vertical-align: top;
}

.infobox-header {
	background-color: #a2a9b1;
	color: #FFF;
	text-align: left;
}

.infobox-header a {
	color: #FFF;
}

.infobox-header td,
.infobox-header th {
	padding: 0.5em 0.5em;
}

.infobox-header img {
	padding: 0 0.2em 0 0.5em;
}

@media screen {
	html.skin-theme-clientpref-night .infobox {
		background-color: inherit;
		color: inherit;
	}
}

@media screen and (prefers-color-scheme: dark) {
  html.skin-theme-clientpref-os .infobox {
	background-color: inherit;
	color: inherit;
  }
}