MediaWiki:Common.css: Difference between revisions

From Wizards and Warlords
Jump to navigation Jump to search
No edit summary
No edit summary
Line 139: Line 139:
margin-top: 8px;
margin-top: 8px;
}
}
.grid-image-wrap {
position: relative;
}
.grid-image-wrap img {
display: block;
width: 100%;
height: auto;
margin: 0 auto;
border: 1px solid #777;
}
.grid-overlay-title {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
background: rgba(255, 255, 255, 0.92);
padding: 8px 14px;
font-variant: small-caps;
font-weight: bold;
font-size: 26px;
line-height: 1.1;
text-align: center;
max-width: 80%;
box-sizing: border-box;
}
.grid-overlay-title a {
text-decoration: none;
}


/* GRID FOUR */
/* GRID FOUR */

Revision as of 21:14, 23 March 2026

/* TOC PAGE DIV */
/* ------------ */
.toc-page #toc,
.toc-page .toc {
	float: right;
	width: 26%;
	max-width: 320px;
	min-width: 220px;
	margin: 0 0 16px 24px;
	clear: right;
	font-size: 0.95em;
	box-sizing: border-box;
}

.toc-page h2,
.toc-page h3,
.toc-page h4 {
	clear: none;
}

.toc-page > h2:first-of-type,
.toc-page > .mw-heading2:first-of-type {
	width: calc(74% - 24px);
}

@media (max-width: 700px) {
	.toc-page #toc,
	.toc-page .toc {
		float: none;
		width: auto;
		max-width: none;
		min-width: 0;
		margin: 0 0 20px 0;
	}

	.toc-page > h2:first-of-type,
	.toc-page > .mw-heading2:first-of-type {
		width: auto;
	}
}

/* INTRO RULES */
/* ----------- */
.main-intro {
	max-width: 1000px;
	margin: 0 auto 12px auto;
	text-align: center;
	font-size: 1.05em;
	line-height: 1.45;
}

.main-intro p {
	margin: 0 0 10px 0;
}


/* SECTION BANNER RULES */
/* -------------------- */
.section-banner {
	text-align: center;
	margin: 18px auto 10px auto;
}

.section-banner img {
	display: block;
	width: 100%;
	max-width: 700px;
	height: auto;
	margin: 0 auto;
}

/* PAGE BANNER */
/* ----------- */
.page-banner {
	text-align: center;
	margin: 0 auto 12px auto;
}

.page-banner img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
}

/* PAGE BANNER MOBILE/DESKTOP */
/* -------------------------- */
.page-banner-desktop {
	display: block;
}

.page-banner-desktop img {
	max-width: 1400px;
}

.page-banner-mobile {
	display: none;
}

.page-banner-mobile img {
	max-width: 700px;
}

@media (max-width: 700px) {
	.page-banner-desktop {
		display: none;
	}

	.page-banner-mobile {
		display: block;
	}
}


/* SHARED GRID RULES */
/* ----------------- */
.grid-item {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

.grid-title {
	font-variant: small-caps;
	font-weight: bold;
	line-height: 1.1;
	text-align: center;
}

.grid-item img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
}

.grid-text {
	margin-top: 8px;
}

.grid-image-wrap {
	position: relative;
}

.grid-image-wrap img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
	border: 1px solid #777;
}

.grid-overlay-title {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	background: rgba(255, 255, 255, 0.92);
	padding: 8px 14px;
	font-variant: small-caps;
	font-weight: bold;
	font-size: 26px;
	line-height: 1.1;
	text-align: center;
	max-width: 80%;
	box-sizing: border-box;
}

.grid-overlay-title a {
	text-decoration: none;
}


/* GRID FOUR */
/* --------- */
.grid-four {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	width: 100%;
	text-align: center;
	align-items: start;
}

.grid-four .grid-item {
	display: grid;
	grid-template-rows: 90px auto 1fr;
	align-items: start;
}

.grid-four .grid-title {
	font-size: 26px;
	margin: 0 0 8px 0;
	height: 90px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	text-align: center;
	overflow-wrap: break-word;
}

.grid-four .grid-item img {
	border: 1px solid #777;
}

.grid-four .grid-text {
	margin-top: 8px;
	font-size: 0.95em;
	line-height: 1.45;
}

@media (max-width: 1100px) {
	.grid-four {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.grid-four .grid-item {
		grid-template-rows: 80px auto 1fr;
	}

	.grid-four .grid-title {
		font-size: 24px;
		height: 80px;
	}
}

/* GRID THREE */
/* ---------- */
.grid-three {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	width: 100%;
	text-align: center;
	align-items: start;
}

.grid-three .grid-item {
	display: grid;
	grid-template-rows: 85px auto 1fr;
	align-items: start;
}

.grid-three .grid-title {
	font-size: 28px;
	margin: 0 0 10px 0;
	padding: 0;
	height: 85px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	text-align: center;
	overflow-wrap: break-word;
}

.grid-three .grid-text {
	margin-top: 8px;
}

@media (max-width: 1000px) {
	.grid-three {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.grid-three .grid-item {
		grid-template-rows: 72px auto 1fr;
	}

	.grid-three .grid-title {
		font-size: 24px;
		height: 72px;
	}
}


/* GRID TWO */
/* -------- */
.grid-two {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px;
	width: 100%;
}

.grid-two-item {
	width: 100%;
	display: grid;
	grid-template-rows: 80px auto;
	align-items: start;
}

.grid-two-title {
	font-variant: small-caps;
	font-weight: bold;
	font-size: 30px;
	line-height: 1.1;
	text-align: center;
	margin: 0 0 12px 0;
	height: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

.grid-two-row {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 16px;
	align-items: start;
}

.grid-two-image img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
	border: 1px solid #777;
}

.grid-two-text {
	text-align: left;
}

@media (max-width: 900px) {
	.grid-two {
		grid-template-columns: 1fr;
	}

	.grid-two-item {
		grid-template-rows: auto auto;
	}

	.grid-two-row {
		grid-template-columns: 1fr;
	}

	.grid-two-text {
		text-align: center;
	}

	.grid-two-title {
		font-size: 26px;
		height: auto;
	}
}


/* GRID ONE */
/* -------- */
.grid-one {
	width: 100%;
	margin: 0 0 32px 0;
	padding-top: 24px;
	padding-bottom: 24px;
	border-top: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
}

.grid-one-title {
	font-variant: small-caps;
	font-weight: bold;
	font-size: 36px;
	line-height: 1.1;
	text-align: center;
	margin: 0 0 16px 0;
}

.grid-one-row {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 20px;
	align-items: start;
}

.grid-one-image img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
	border: 1px solid #777;
}

.grid-one-text {
	text-align: left;
}

@media (max-width: 900px) {
	.grid-one-row {
		grid-template-columns: 1fr;
	}

	.grid-one-text {
		text-align: center;
	}

	.grid-one-title {
		font-size: 30px;
	}
}