Jump to content

MediaWiki:Mainpage.css: Difference between revisions

From ZelocoreCMS Wiki
Applied robust, multi-device responsive CSS rules.
Tag: Reverted
Minimal: title hide only, all design in Common.css
Β 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* MediaWiki:Mainpage.css - Dedicated CSS for the Main Page layout */
/* MediaWiki:Mainpage.css β€” title hide only. All design in Common.css. */
Β 
#firstHeading, .firstHeading, .mw-page-title-main { display: none !important; }
/* Hide the page title on Main_Page */
#firstHeading, .firstHeading, .mw-page-title-main, .page-header__title { display: none !important; }
Β 
/* Top banner */
#mp-topbanner {
Β  background: #cee0f2;
Β  border: 1px solid #a2a9b1;
Β  padding: 12px 16px;
Β  margin-bottom: 14px;
Β  text-align: center;
Β  font-size: 1.05em;
}
Β 
/* Two-column layout - Desktop */
#mp-upper {
Β  display: flex;
Β  flex-wrap: nowrap; /* Prevent messy wrapping on desktop, let media queries handle it */
Β  gap: 15px;
Β  margin-bottom: 14px;
Β  align-items: flex-start;
}
Β 
#mp-left {
Β  flex: 1 1 55%;
Β  min-width: 0; /* Prevents overflow issues */
}
Β 
#mp-right {
Β  flex: 1 1 45%;
Β  min-width: 0;
}
Β 
/* Headings */
.mp-h2 {
Β  background: #cee0f2;
Β  border: 1px solid #a2a9b1;
Β  border-bottom: none;
Β  padding: 5px 10px;
Β  font-size: 1em;
Β  font-weight: bold;
Β  color: #202122;
Β  margin: 0;
}
.mp-h2-yellow { background: #fef6e7; }
.mp-h2-greenΒ  { background: #ecf5ec; }
.mp-h2-grayΒ  { background: #dce3ee; }
Β 
/* Body of sections */
.mp-body {
Β  background: #ffffff;
Β  border: 1px solid #a2a9b1;
Β  border-top: none;
Β  padding: 10px 12px;
Β  margin-bottom: 12px;
Β  font-size: 0.9em;
Β  line-height: 1.6;
Β  color: #202122;
Β  overflow-x: auto; /* Allow tables to scroll horizontally safely */
Β  box-sizing: border-box;
}
.mp-body ul { margin: 0; padding-left: 1.5em; }
Β 
/* Portal grid */
#mp-portals {
Β  margin-top: 14px;
Β  border: 1px solid #a2a9b1;
Β  box-sizing: border-box;
}
#mp-portals-header {
Β  background: #dce3ee;
Β  border-bottom: 1px solid #a2a9b1;
Β  padding: 6px 12px;
Β  font-weight: bold;
Β  font-size: 0.95em;
}
.mp-portal-grid {
Β  display: flex;
Β  flex-wrap: wrap;
Β  background: #ffffff;
}
.mp-portal-cell {
Β  flex: 1 1 15%;
Β  min-width: 100px; /* Reduce min-width for mobile safety */
Β  border-right: 1px solid #eaecf0;
Β  border-bottom: 1px solid #eaecf0;
Β  padding: 10px 8px;
Β  text-align: center;
Β  font-size: 0.85em;
Β  box-sizing: border-box;
}
.mp-portal-cell:hover { background: #eaf3fb; }
.mp-portal-cell a { color: #3366cc; font-weight: bold; display: block; text-decoration: none; }
.mp-portal-icon { font-size: 1.8em; display: block; margin-bottom: 4px; }
.mp-portal-desc { display: block; color: #54595d; font-size: 0.85em; margin-top: 2px; font-weight: normal; }
Β 
Β 
/* ============================================================
Β  RESPONSIVE DESIGN RULES
Β  ============================================================ */
Β 
/* Tablet and Smaller Desktop (up to 1000px) */
@media screen and (max-width: 1000px) {
Β  #mp-upper {
Β  Β  display: block !important; /* Break the flex layout to stack cleanly */
Β  Β  margin-bottom: 0 !important;
Β  }
Β  #mp-left, #mp-right {
Β  Β  width: 100% !important;
Β  Β  display: block !important;
Β  Β  margin-bottom: 15px !important;
Β  }
Β  .mp-portal-cell {
Β  Β  flex: 1 1 30% !important; /* 3 items per row instead of 6 */
Β  }
}
Β 
/* Standard Mobile Phones (up to 600px) */
@media screen and (max-width: 600px) {
Β  #mp-topbanner {
Β  Β  padding: 10px;
Β  Β  font-size: 0.95em;
Β  }
Β  .mp-body {
Β  Β  padding: 8px 10px; /* Shrink padding slightly to maximize screen space */
Β  }
Β  .mp-portal-cell {
Β  Β  flex: 1 1 45% !important; /* 2 items per row */
Β  }
}
Β 
/* Very Small Mobile Phones (up to 400px) */
@media screen and (max-width: 400px) {
Β  .mp-portal-cell {
Β  Β  flex: 1 1 100% !important; /* Stack portals completely (1 item per row) */
Β  }
}

Latest revision as of 21:54, 29 July 2026

/* MediaWiki:Mainpage.css β€” title hide only. All design in Common.css. */
#firstHeading, .firstHeading, .mw-page-title-main { display: none !important; }