Jump to content

MediaWiki:Mainpage.css: Difference between revisions

From ZelocoreCMS Wiki
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 1: Line 1:
/* MediaWiki:Mainpage.css - Improved dedicated CSS for Main Page */
/* MediaWiki:Mainpage.css - Improved for current Main Page structure */


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


/* Hide the page title only on Main Page */
body.page-Main_Page #firstHeading,
body.page-Main_Page #firstHeading,
body.page-Main_Page .firstHeading,
body.page-Main_Page .firstHeading,
Line 13: Line 12:
}
}


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


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


#mp-topbanner {
#mp-topbanner {
Line 34: Line 32:
}
}


/* ============================================================
#mp-topbanner small {
   TWO-COLUMN LAYOUT
display: block;
   ============================================================ */
margin-top: 4px;
font-size: 0.92em;
}
 
/* =========================================================
   UPPER TWO-COLUMN AREA
   ========================================================= */


#mp-upper {
#mp-upper {
Line 56: Line 60:
}
}


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


.mp-h2 {
.mp-h2 {
Line 84: Line 88:
}
}


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


.mp-body {
.mp-body {
Line 99: Line 103:
box-sizing: border-box;
box-sizing: border-box;
word-wrap: break-word;
word-wrap: break-word;
overflow-wrap: anywhere;
overflow-wrap: break-word;
}
}


/* Paragraphs */
/* Text */
.mp-body p {
.mp-body p {
margin: 0 0 0.8em 0;
margin: 0 0 0.8em 0;
Line 109: Line 113:
.mp-body p:last-child {
.mp-body p:last-child {
margin-bottom: 0;
margin-bottom: 0;
}
.mp-body small {
display: inline-block;
margin-top: 6px;
}
}


Line 114: Line 123:
.mp-body ul,
.mp-body ul,
.mp-body ol {
.mp-body ol {
margin: 0.25em 0 0.75em 1.4em;
margin: 0.3em 0 0.8em 1.4em;
padding: 0;
padding: 0;
}
}
Line 126: Line 135:
}
}


/* Nested lists */
/* Links */
.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 {
.mp-body a {
text-decoration: none;
text-decoration: none;
Line 144: Line 144:
}
}


/* Tables only: horizontal scroll if needed */
/* Images */
.mp-body table {
.mp-body img {
max-width: 100%;
height: auto;
}
 
/* =========================================================
  WIKITABLES INSIDE MAIN PAGE
  ========================================================= */
 
.mp-body .wikitable {
width: 100% !important;
margin: 0.4em 0 0.8em 0 !important;
border-collapse: collapse;
font-size: 0.95em;
background: #fff;
}
 
.mp-body .wikitable th,
.mp-body .wikitable td {
padding: 8px 10px;
border: 1px solid #c8ccd1;
vertical-align: top;
line-height: 1.45;
}
 
.mp-body .wikitable th {
background: #eaecf0;
text-align: left;
font-weight: 700;
}
 
.mp-body .wikitable td {
background: #fff;
}
 
/* Scroll tables only when needed */
.mp-body .wikitable {
display: block;
display: block;
width: 100%;
max-width: 100%;
overflow-x: auto;
overflow-x: auto;
white-space: nowrap;
}
/* =========================================================
  BROWSE BY CATEGORY TABLE
  ========================================================= */
/* Style the plain wiki table used in the category section */
.mp-body > table {
width: 100% !important;
border-collapse: collapse;
border-collapse: collapse;
margin: 0;
}
.mp-body > table td {
width: 50%;
vertical-align: top;
padding: 0 6px 0 0;
}
.mp-body > table td:last-child {
padding-right: 0;
padding-left: 6px;
}
}


/* Images */
.mp-body > table ul {
.mp-body img {
margin-top: 0;
max-width: 100%;
margin-bottom: 0;
height: auto;
}
}


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


#mp-portals {
#mp-portals {
Line 188: Line 243:
.mp-portal-cell {
.mp-portal-cell {
flex: 1 1 15%;
flex: 1 1 15%;
min-width: 100px;
min-width: 120px;
border-right: 1px solid #eaecf0;
border-right: 1px solid #eaecf0;
border-bottom: 1px solid #eaecf0;
border-bottom: 1px solid #eaecf0;
Line 230: Line 285:
}
}


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


/* Tablet and smaller desktop */
@media screen and (max-width: 1000px) {
@media screen and (max-width: 1000px) {
#mp-upper {
#mp-upper {
Line 258: Line 307:
}
}


/* Mobile phones */
@media screen and (max-width: 700px) {
.mp-body > table,
.mp-body > table tbody,
.mp-body > table tr,
.mp-body > table td {
display: block;
width: 100% !important;
}
 
.mp-body > table td {
padding: 0 0 8px 0 !important;
}
}
 
@media screen and (max-width: 600px) {
@media screen and (max-width: 600px) {
#mp-topbanner {
#mp-topbanner {
Line 286: Line 348:
}
}


/* Very small phones */
@media screen and (max-width: 400px) {
@media screen and (max-width: 400px) {
.mp-portal-cell {
.mp-portal-cell {

Revision as of 13:25, 29 July 2026

/* MediaWiki:Mainpage.css - Improved for current Main Page structure */

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

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;
}

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;
}

#mp-topbanner small {
	display: block;
	margin-top: 4px;
	font-size: 0.92em;
}

/* =========================================================
   UPPER TWO-COLUMN AREA
   ========================================================= */

#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 HEADERS
   ========================================================= */

.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 BODY
   ========================================================= */

.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: break-word;
}

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

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

.mp-body small {
	display: inline-block;
	margin-top: 6px;
}

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

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

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

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

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

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

/* =========================================================
   WIKITABLES INSIDE MAIN PAGE
   ========================================================= */

.mp-body .wikitable {
	width: 100% !important;
	margin: 0.4em 0 0.8em 0 !important;
	border-collapse: collapse;
	font-size: 0.95em;
	background: #fff;
}

.mp-body .wikitable th,
.mp-body .wikitable td {
	padding: 8px 10px;
	border: 1px solid #c8ccd1;
	vertical-align: top;
	line-height: 1.45;
}

.mp-body .wikitable th {
	background: #eaecf0;
	text-align: left;
	font-weight: 700;
}

.mp-body .wikitable td {
	background: #fff;
}

/* Scroll tables only when needed */
.mp-body .wikitable {
	display: block;
	overflow-x: auto;
	white-space: nowrap;
}

/* =========================================================
   BROWSE BY CATEGORY TABLE
   ========================================================= */

/* Style the plain wiki table used in the category section */
.mp-body > table {
	width: 100% !important;
	border-collapse: collapse;
	margin: 0;
}

.mp-body > table td {
	width: 50%;
	vertical-align: top;
	padding: 0 6px 0 0;
}

.mp-body > table td:last-child {
	padding-right: 0;
	padding-left: 6px;
}

.mp-body > table ul {
	margin-top: 0;
	margin-bottom: 0;
}

/* =========================================================
   PORTALS
   ========================================================= */

#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: 120px;
	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;
}

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

@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%;
	}
}

@media screen and (max-width: 700px) {
	.mp-body > table,
	.mp-body > table tbody,
	.mp-body > table tr,
	.mp-body > table td {
		display: block;
		width: 100% !important;
	}

	.mp-body > table td {
		padding: 0 0 8px 0 !important;
	}
}

@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;
	}
}

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