Jump to content

MediaWiki:Mainpage.css

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* MediaWiki:Mainpage.css - Improved dedicated CSS for Main Page */

/* ============================================================
   MAIN PAGE ONLY SAFETY
   ============================================================ */

/* Hide the page title only on Main Page */
body.page-Main_Page #firstHeading,
body.page-Main_Page .firstHeading,
body.page-Main_Page .mw-page-title-main,
body.page-Main_Page .page-header__title {
	display: none !important;
}

/* General spacing cleanup for main page content */
body.page-Main_Page .mw-parser-output {
	font-size: 100%;
	line-height: 1.6;
}

/* ============================================================
   TOP BANNER
   ============================================================ */

#mp-topbanner {
	background: #cee0f2;
	border: 1px solid #a2a9b1;
	padding: 12px 16px;
	margin: 0 0 14px 0;
	text-align: center;
	font-size: 1.05em;
	line-height: 1.5;
	box-sizing: border-box;
}

/* ============================================================
   TWO-COLUMN LAYOUT
   ============================================================ */

#mp-upper {
	display: flex;
	flex-wrap: nowrap;
	gap: 15px;
	margin: 0 0 14px 0;
	align-items: flex-start;
}

#mp-left {
	flex: 1 1 55%;
	min-width: 0;
}

#mp-right {
	flex: 1 1 45%;
	min-width: 0;
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */

.mp-h2 {
	background: #cee0f2;
	border: 1px solid #a2a9b1;
	border-bottom: none;
	padding: 6px 10px;
	margin: 0;
	font-size: 1em;
	font-weight: 700;
	line-height: 1.4;
	color: #202122;
}

.mp-h2-yellow {
	background: #fef6e7;
}

.mp-h2-green {
	background: #ecf5ec;
}

.mp-h2-gray {
	background: #dce3ee;
}

/* ============================================================
   SECTION BODIES
   ============================================================ */

.mp-body {
	background: #ffffff;
	border: 1px solid #a2a9b1;
	border-top: none;
	padding: 10px 12px;
	margin: 0 0 12px 0;
	font-size: 0.95em;
	line-height: 1.65;
	color: #202122;
	box-sizing: border-box;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

/* Paragraphs */
.mp-body p {
	margin: 0 0 0.8em 0;
}

.mp-body p:last-child {
	margin-bottom: 0;
}

/* Lists */
.mp-body ul,
.mp-body ol {
	margin: 0.25em 0 0.75em 1.4em;
	padding: 0;
}

.mp-body li {
	margin: 0.2em 0;
}

.mp-body li:empty {
	display: none;
}

/* Nested lists */
.mp-body ul ul,
.mp-body ol ol,
.mp-body ul ol,
.mp-body ol ul {
	margin-top: 0.25em;
	margin-bottom: 0.25em;
}

/* Links inside body */
.mp-body a {
	text-decoration: none;
}

.mp-body a:hover {
	text-decoration: underline;
}

/* Tables only: horizontal scroll if needed */
.mp-body table {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
}

/* Images */
.mp-body img {
	max-width: 100%;
	height: auto;
}

/* ============================================================
   PORTAL GRID
   ============================================================ */

#mp-portals {
	margin-top: 14px;
	border: 1px solid #a2a9b1;
	box-sizing: border-box;
	background: #ffffff;
}

#mp-portals-header {
	background: #dce3ee;
	border-bottom: 1px solid #a2a9b1;
	padding: 6px 12px;
	font-weight: 700;
	font-size: 0.95em;
	line-height: 1.4;
	color: #202122;
}

.mp-portal-grid {
	display: flex;
	flex-wrap: wrap;
	background: #ffffff;
}

.mp-portal-cell {
	flex: 1 1 15%;
	min-width: 100px;
	border-right: 1px solid #eaecf0;
	border-bottom: 1px solid #eaecf0;
	padding: 10px 8px;
	text-align: center;
	font-size: 0.9em;
	line-height: 1.45;
	box-sizing: border-box;
	transition: background-color 0.15s ease-in-out;
}

.mp-portal-cell:hover {
	background: #eaf3fb;
}

.mp-portal-cell a {
	color: #3366cc;
	font-weight: 700;
	display: block;
	text-decoration: none;
}

.mp-portal-cell a:hover {
	text-decoration: underline;
}

.mp-portal-icon {
	display: block;
	font-size: 1.8em;
	line-height: 1;
	margin-bottom: 4px;
}

.mp-portal-desc {
	display: block;
	margin-top: 2px;
	color: #54595d;
	font-size: 0.85em;
	font-weight: 400;
	line-height: 1.4;
}

/* Remove visual double borders at row/edge ends where possible */
.mp-portal-grid .mp-portal-cell:last-child {
	border-right: none;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* Tablet and smaller desktop */
@media screen and (max-width: 1000px) {
	#mp-upper {
		display: block;
		margin-bottom: 0;
	}

	#mp-left,
	#mp-right {
		width: 100%;
		display: block;
		margin-bottom: 15px;
	}

	.mp-portal-cell {
		flex: 1 1 30%;
	}
}

/* Mobile phones */
@media screen and (max-width: 600px) {
	#mp-topbanner {
		padding: 10px;
		font-size: 0.98em;
	}

	.mp-h2 {
		padding: 6px 8px;
		font-size: 0.98em;
	}

	.mp-body {
		padding: 8px 10px;
		font-size: 0.95em;
	}

	.mp-body ul,
	.mp-body ol {
		margin-left: 1.2em;
	}

	.mp-portal-cell {
		flex: 1 1 45%;
		padding: 10px 6px;
	}
}

/* Very small phones */
@media screen and (max-width: 400px) {
	.mp-portal-cell {
		flex: 1 1 100%;
	}
}