Jump to content

Template:Incident infobox/styles.css: Difference between revisions

From Srcfy Wiki
Keep the language bar beside the infobox so text starts at the top
Keep the language bar beside the infobox so text starts at the top
 
Line 13: Line 13:
box-sizing: border-box;
box-sizing: border-box;
}
}
/* Translate's language bar has clear:both, which pushes it (and the article text after it)
/* Articles put <languages/> above the infobox. If a page has it below (e.g. one created with the
  below the floated infobox. Let it sit beside the infobox instead. */
  form, where the infobox comes first), Translate's full-width, clear:both language bar would push the
  article text below the infobox; let it shrink and sit beside the infobox instead. */
.incident-infobox ~ .mw-pt-languages {
.incident-infobox ~ .mw-pt-languages {
clear: none;
clear: none;
width: auto;
display: flow-root;
display: flow-root;
}
}

Latest revision as of 01:06, 31 October 2026

/* Styles for [[Template:Incident infobox]] and [[Template:Incident navbox]] (TemplateStyles) */
.incident-infobox {
	float: right;
	clear: right;
	width: 22em;
	max-width: 100%;
	margin: 0 0 1em 1.4em;
	border: 1px solid #a2a9b1;
	background: #f8f9fa;
	color: #202122;
	font-size: 88%;
	line-height: 1.5;
	box-sizing: border-box;
}
/* Articles put <languages/> above the infobox. If a page has it below (e.g. one created with the
   form, where the infobox comes first), Translate's full-width, clear:both language bar would push the
   article text below the infobox; let it shrink and sit beside the infobox instead. */
.incident-infobox ~ .mw-pt-languages {
	clear: none;
	width: auto;
	display: flow-root;
}
.incident-infobox-title {
	padding: 0.5em 0.7em;
	background: #7a2e12;
	color: #ffffff;
	font-weight: bold;
	font-size: 115%;
	text-align: center;
}
.incident-infobox-map {
	border-bottom: 1px solid #a2a9b1;
}
.incident-infobox-table {
	width: 100%;
	border-collapse: collapse;
}
.incident-infobox-table th,
.incident-infobox-table td {
	padding: 0.3em 0.7em;
	vertical-align: top;
	text-align: left;
	border-top: 1px solid #eaecf0;
}
.incident-infobox-table th {
	width: 38%;
	font-weight: bold;
	white-space: normal;
}
.incident-infobox-table ul {
	margin: 0 0 0 1.1em;
}
.incident-osm {
	font-size: 92%;
}
.incident-navbox {
	clear: both;
	margin-top: 2em;
	border: 1px solid #a2a9b1;
	background: #f8f9fa;
	color: #202122;
	font-size: 88%;
}
.incident-navbox-title {
	padding: 0.35em 0.7em;
	background: #7a2e12;
	color: #ffffff;
	font-weight: bold;
	text-align: center;
}
.incident-navbox-body {
	padding: 0.5em 0.9em;
	line-height: 1.7;
}
.incident-navbox-body ul {
	margin: 0;
	list-style: none;
}
.incident-navbox-body li {
	display: inline;
}
.incident-navbox-body li::after {
	content: " · ";
	font-weight: bold;
}
.incident-navbox-body li:last-child::after {
	content: "";
}
.incident-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8em;
	margin: 1em 0;
}
.incident-stat {
	flex: 1 1 9em;
	padding: 0.7em 1em;
	border: 1px solid #a2a9b1;
	border-top: 4px solid #7a2e12;
	background: #f8f9fa;
	color: #202122;
}
.incident-stat-value {
	font-size: 180%;
	font-weight: bold;
	line-height: 1.2;
}
.incident-stat-label {
	font-size: 90%;
	color: #54595d;
}

@media screen and ( max-width: 720px ) {
	.incident-infobox {
		float: none;
		width: 100%;
		margin: 0 0 1em 0;
	}
}

@media screen {
	html.skin-theme-clientpref-night .incident-infobox,
	html.skin-theme-clientpref-night .incident-navbox,
	html.skin-theme-clientpref-night .incident-stat {
		background: #1b1d1f;
		color: #eaecf0;
		border-color: #54595d;
	}
	html.skin-theme-clientpref-night .incident-infobox-table th,
	html.skin-theme-clientpref-night .incident-infobox-table td {
		border-top-color: #3a3d40;
	}
	html.skin-theme-clientpref-night .incident-stat-label {
		color: #a2a9b1;
	}
}
@media screen and ( prefers-color-scheme: dark ) {
	html.skin-theme-clientpref-os .incident-infobox,
	html.skin-theme-clientpref-os .incident-navbox,
	html.skin-theme-clientpref-os .incident-stat {
		background: #1b1d1f;
		color: #eaecf0;
		border-color: #54595d;
	}
	html.skin-theme-clientpref-os .incident-infobox-table th,
	html.skin-theme-clientpref-os .incident-infobox-table td {
		border-top-color: #3a3d40;
	}
	html.skin-theme-clientpref-os .incident-stat-label {
		color: #a2a9b1;
	}
}