Jump to content

Template:IEF article/styles.css

From Impact Evaluation Foundation
/* Shared styles for IEF.wiki article components: infoboxes, key takeaways, callouts,
   process steps, key figures, hatnotes and the series navbox. Edit with care: used on many pages. */

/* Infoboxes */
.ief-infobox {
	float: right;
	clear: right;
	width: 22em;
	margin: 0.3em 0 1em 1.4em;
	border: 1px solid var(--border-color-subtle, #c8ccd1);
	border-radius: 6px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	background-color: var(--background-color-neutral-subtle, #f8f9fa);
	color: inherit;
	font-size: 88%;
	line-height: 1.5;
}
.ief-infobox th.ief-infobox-title {
	padding: 0.65em 0.9em;
	background-color: #173f5a;
	color: #fff;
	font-size: 1.12em;
	line-height: 1.35;
	text-align: center;
}
.ief-infobox .ief-infobox-subtitle {
	display: block;
	margin-top: 0.15em;
	font-size: 0.82em;
	font-weight: normal;
	color: #cfe9e5;
}
.ief-infobox td.ief-infobox-image {
	padding: 0.7em;
	text-align: center;
	background-color: var(--background-color-base, #fff);
}
.ief-infobox .ief-infobox-caption {
	margin-top: 0.4em;
	font-size: 0.9em;
	line-height: 1.4;
	color: var(--color-subtle, #54595d);
}
.ief-infobox th.ief-infobox-label,
.ief-infobox td.ief-infobox-data {
	padding: 0.45em 0.8em;
	border-top: 1px solid var(--border-color-muted, #dadde3);
	vertical-align: top;
	text-align: left;
}
.ief-infobox th.ief-infobox-label {
	width: 36%;
	font-weight: 600;
}
.ief-infobox td.ief-infobox-data {
	padding-left: 0.2em;
}
.ief-infobox td.ief-infobox-below {
	padding: 0.5em 0.8em;
	border-top: 1px solid var(--border-color-muted, #dadde3);
	font-size: 0.9em;
	text-align: center;
	color: var(--color-subtle, #54595d);
}

/* Boxes: key takeaways and callouts */
.ief-box {
	margin: 1em 0 1.4em;
	padding: 0.85em 1.1em;
	border: 1px solid var(--border-color-subtle, #c8ccd1);
	border-left: 5px solid #2a7189;
	border-radius: 6px;
	background-color: var(--background-color-neutral-subtle, #f8f9fa);
}
.ief-box-title {
	margin-bottom: 0.35em;
	font-size: 0.78em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #2a7189;
}
.ief-box > :last-child {
	margin-bottom: 0;
}
.ief-takeaways,
.ief-callout-mrv {
	border-left-color: #5ab1a7;
	background-color: #f0f8f7;
}
.ief-callout-warning {
	border-left-color: #c47f00;
	background-color: #fff7e8;
}
.ief-callout-warning .ief-box-title {
	color: #8a5a00;
}
.ief-callout-example {
	border-left-color: #6b4ba1;
}
.ief-callout-example .ief-box-title {
	color: #6b4ba1;
}
.ief-callout-definition {
	border-left-color: #173f5a;
}
.ief-callout-definition .ief-box-title {
	color: #173f5a;
}

/* Process steps */
.ief-steps {
	margin: 1em 0 1.4em;
}
.ief-steps-title {
	margin-bottom: 0.5em;
	font-weight: 700;
}
.ief-steps-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}
.ief-steps-n1 .ief-steps-grid { grid-template-columns: minmax(0, 1fr); }
.ief-steps-n2 .ief-steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ief-steps-n3 .ief-steps-grid,
.ief-steps-n6 .ief-steps-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ief-steps-n5 .ief-steps-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ief-step {
	padding: 0.75em 0.9em 0.85em;
	border: 1px solid var(--border-color-subtle, #c8ccd1);
	border-top: 4px solid #5ab1a7;
	border-radius: 6px;
	background-color: var(--background-color-base, #fff);
}
.ief-step-num {
	display: inline-block;
	width: 1.75em;
	height: 1.75em;
	margin-bottom: 0.35em;
	border-radius: 50%;
	background-color: #173f5a;
	color: #fff;
	font-size: 0.85em;
	font-weight: 700;
	line-height: 1.75em;
	text-align: center;
}
.ief-step-title {
	margin-bottom: 0.25em;
	font-weight: 700;
	line-height: 1.3;
}
.ief-step-text {
	font-size: 0.92em;
	line-height: 1.45;
	color: var(--color-subtle, #54595d);
}
.ief-steps-note {
	margin-top: 0.45em;
	font-size: 0.85em;
	color: var(--color-subtle, #54595d);
}

/* Key figures */
.ief-figures {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin: 1em 0 0.4em;
}
.ief-figures-n1 { grid-template-columns: minmax(0, 1fr); }
.ief-figures-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ief-figures-n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ief-figure {
	padding: 0.8em 0.95em;
	border-radius: 6px;
	background-color: #173f5a;
	color: #fff;
}
.ief-figure-value {
	font-size: 1.55em;
	font-weight: 700;
	line-height: 1.15;
	color: #8fdcd2;
}
.ief-figure-label {
	margin-top: 0.3em;
	font-size: 0.88em;
	line-height: 1.35;
	color: #e8f4f2;
}
.ief-figure-label a,
.ief-figure-label a:visited {
	color: #bfe8e2;
}
.ief-figures-source {
	margin: 0.3em 0 1.3em;
	font-size: 0.82em;
	color: var(--color-subtle, #54595d);
}

/* Hatnotes */
.ief-hatnote {
	margin: 0 0 0.7em;
	padding-left: 1.6em;
	font-style: italic;
	color: var(--color-subtle, #54595d);
}

/* Series navbox */
.ief-navbox {
	clear: both;
	margin: 2.2em 0 1em;
	border: 1px solid var(--border-color-subtle, #c8ccd1);
	border-radius: 6px;
	overflow: hidden;
	font-size: 90%;
	line-height: 1.5;
}
.ief-navbox-title {
	padding: 0.55em 0.9em;
	background-color: #173f5a;
	color: #fff;
	font-weight: 700;
	text-align: center;
}
.ief-navbox-title a,
.ief-navbox-title a:visited {
	color: #fff;
}
.ief-navbox-row {
	display: flex;
	border-top: 1px solid var(--border-color-muted, #dadde3);
}
.ief-navbox-group {
	flex: 0 0 10.5em;
	padding: 0.45em 0.8em;
	background-color: #e3f1ef;
	color: #173f5a;
	font-weight: 600;
	text-align: right;
}
.ief-navbox-list {
	flex: 1 1 auto;
	padding: 0.45em 0.9em;
}
.ief-navbox-below {
	padding: 0.45em 0.9em;
	border-top: 1px solid var(--border-color-muted, #dadde3);
	font-size: 0.92em;
	text-align: center;
}
.ief-nav-item {
	white-space: nowrap;
}
.ief-nav-item + .ief-nav-item::before {
	content: " · ";
	font-weight: 700;
}
.ief-hatnote .ief-nav-item {
	white-space: normal;
}
.ief-hatnote .ief-nav-item + .ief-nav-item::before {
	content: ", ";
	font-weight: normal;
}

@media screen and (max-width: 1000px) {
	.ief-steps-n4 .ief-steps-grid,
	.ief-steps-n7 .ief-steps-grid,
	.ief-steps-n8 .ief-steps-grid,
	.ief-figures-n4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.ief-steps-n5 .ief-steps-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media screen and (max-width: 720px) {
	.ief-steps .ief-steps-grid,
	.ief-figures {
		grid-template-columns: minmax(0, 1fr);
	}
	.ief-figures-n2,
	.ief-figures-n4,
	.ief-figures-n6 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.ief-infobox {
		float: none;
		width: 100%;
		margin: 0.5em 0 1em;
	}
	.ief-navbox-row {
		display: block;
	}
	.ief-navbox-group {
		text-align: left;
	}
	.ief-nav-item {
		white-space: normal;
	}
}

/* Dark mode */
html.skin-theme-clientpref-night .ief-takeaways,
html.skin-theme-clientpref-night .ief-callout-mrv {
	background-color: #11292a;
}
html.skin-theme-clientpref-night .ief-callout-warning {
	background-color: #2b2212;
}
html.skin-theme-clientpref-night .ief-box-title {
	color: #7fcdc4;
}
html.skin-theme-clientpref-night .ief-callout-warning .ief-box-title {
	color: #f0b85a;
}
html.skin-theme-clientpref-night .ief-callout-example .ief-box-title {
	color: #b9a0e6;
}
html.skin-theme-clientpref-night .ief-callout-definition .ief-box-title {
	color: #9ccfe6;
}
html.skin-theme-clientpref-night .ief-navbox-group {
	background-color: #16302e;
	color: #a8ddd5;
}
@media screen and (prefers-color-scheme: dark) {
	html.skin-theme-clientpref-os .ief-takeaways,
	html.skin-theme-clientpref-os .ief-callout-mrv {
		background-color: #11292a;
	}
	html.skin-theme-clientpref-os .ief-callout-warning {
		background-color: #2b2212;
	}
	html.skin-theme-clientpref-os .ief-box-title {
		color: #7fcdc4;
	}
	html.skin-theme-clientpref-os .ief-callout-warning .ief-box-title {
		color: #f0b85a;
	}
	html.skin-theme-clientpref-os .ief-callout-example .ief-box-title {
		color: #b9a0e6;
	}
	html.skin-theme-clientpref-os .ief-callout-definition .ief-box-title {
		color: #9ccfe6;
	}
	html.skin-theme-clientpref-os .ief-navbox-group {
		background-color: #16302e;
		color: #a8ddd5;
	}
}