Jump to content

MediaWiki:Common.css: Difference between revisions

From Once Human Guide
No edit summary
No edit summary
Line 245: Line 245:
.mw-tab-content div:empty {
.mw-tab-content div:empty {
   display: none !important;
   display: none !important;
}
/* ===== Main Page redesign — shared ===== */
.page-Main_Page .firstHeading,
.page-Main_Page #siteSub { display: none; }  /* hide "Main Page" title for a cleaner landing */
.mp-wrap a { text-decoration: none; }
.mp-wrap a.new { color: inherit; }            /* don't redlink-color nav cards */
/* clickable image fills its container */
.mp-card-img img, .mp-tile-img img, .mp-banner-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
}

Revision as of 16:21, 11 June 2026

/* =============================================================
   COMMON.CSS
   Sections:
     1. Navigation
     2. Tab System
     3. Dropdown System
        3a. Container
        3b. Button
        3c. List & Items
        3d. Scrollbar
     4. Output Panel (Tech Bench Style)
     5. Cleanup / Utility Overrides
   ============================================================= */


/* ================= 1. NAVIGATION ================= */
.navtable {
  margin: 0 auto;
  border: none;
  border-collapse: collapse;
  text-align: center;
}

.navcell {
  padding: 0 18px 10px;
  vertical-align: top;
}

.navimg img {
  display: block;
  margin: 0 auto;
}

.navicon {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 200px;
}

.navicon--row1 { height: 150px; }
.navicon--row2 { height: 200px; }

.navlabel {
  width: 100%;
  margin-top: 4px;
  text-align: center;
  font-weight: 800;
  line-height: 1.05;
}

.navlabel--tight { margin-top: 2px; }

.navicon--empty,
.navlabel--empty {
  visibility: hidden;
}

body.page-Main_Page h1.firstHeading {
  display: none;
}


/* ================= 2. TAB SYSTEM ================= */
.mw-tab-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.mw-tab-btn {
  min-width: 90px;
  padding: 8px 14px;
  background: #111;
  color: #ccc;
  border: 1px solid #444;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
}

.mw-tab-btn:hover {
  border-color: #00bfff;
  color: #fff;
}

.mw-tab-btn.active {
  background: #00bfff;
  color: #000;
}

.mw-tab-content {
  display: none;
  overflow: visible !important;
}

.mw-tab-content.active {
  display: block;
}


/* ================= 3. DROPDOWN SYSTEM ================= */

/* -- 3a. Container -- */
.mw-dropdown-ui {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 18px auto;
  padding: 14px;
  background: linear-gradient(145deg, #1a1a1a, #111);
  border: 1px solid #333;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
  overflow: visible;
}

/* Header label (pulls from data-label attribute) */
.mw-dropdown-ui::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 10px;
  color: #00bfff;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
}

/* Force consistent sizing on children */
.mw-dropdown-ui *,
.mod-dropdown-btn,
.mw-dropdown-output {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* -- 3b. Button -- */
.mod-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  background: #0f0f0f;
  color: #eee;
  border: 1px solid #444;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

/* -- 3c. List & Items -- */
.mod-dropdown-list {
  display: none;
  position: absolute;
  top: 56px;
  left: 14px;
  right: 14px;
  width: auto;
  max-height: 250px;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 99999;
}

.mod-dropdown-item {
  padding: 8px;
  color: #ccc;
  border-bottom: 1px solid #222;
  cursor: pointer;
}

.mod-dropdown-item:last-child {
  border-bottom: none;
}

.mod-dropdown-item:hover {
  background: #00bfff;
  color: #000;
}

/* -- 3d. Scrollbar -- */
.mod-dropdown-list::-webkit-scrollbar {
  width: 6px;
}

.mod-dropdown-list::-webkit-scrollbar-thumb {
  background: #00bfff;
  border-radius: 3px;
}


/* ================= 4. OUTPUT PANEL (TECH BENCH STYLE) ================= */
.mw-dropdown-output {
  min-height: 70px;
  margin-top: 10px;
  padding: 12px;
  background: #0d1319;
  border: 1px solid #1f2a35;
  border-radius: 10px;
  color: #e6edf3;
  font-size: 13px;
}

.mw-ui-placeholder {
  color: #666;
  font-style: italic;
  text-align: center;
}

.mw-ui-title {
  margin-bottom: 8px;
  color: #e6edf3;
  font-size: 14px;
  font-weight: 700;
}

.mw-ui-line {
  padding: 6px 0;
  border-top: 1px solid #1a222b;
  color: #9fb0c3;
  font-size: 13px;
}

.mw-ui-line:first-of-type {
  border-top: none;
}


/* ================= 5. CLEANUP / UTILITY OVERRIDES ================= */
.mw-dropdown,
.mw-dropdown-content {
  display: none !important;
}

[data-left]:empty,
[data-right]:empty,
.mw-tab-content div:empty {
  display: none !important;
}
/* ===== Main Page redesign — shared ===== */
.page-Main_Page .firstHeading,
.page-Main_Page #siteSub { display: none; }   /* hide "Main Page" title for a cleaner landing */

.mp-wrap a { text-decoration: none; }
.mp-wrap a.new { color: inherit; }            /* don't redlink-color nav cards */

/* clickable image fills its container */
.mp-card-img img, .mp-tile-img img, .mp-banner-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}