Jump to content

MediaWiki:Common.css: Difference between revisions

From Once Human Guide
No edit summary
No edit summary
Line 1: Line 1:
/* ================= NAV ================= */
/* ================= DROPDOWN SYSTEM (FULL FIX) ================= */
 
.navtable{
  border: none;
  text-align: center;
  margin: 0 auto;
  border-collapse: collapse;
}
 
.navcell{
  padding: 0 18px 10px 18px;
  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{
  text-align: center;
  width: 100%;
  margin-top: 4px;
  line-height: 1.05;
  font-weight: 800;
}
 
.navlabel--tight{ margin-top: 2px; }
 
.navicon--empty,
.navlabel--empty{
  visibility:hidden;
}
 
body.page-Main_Page h1.firstHeading {
  display: none;
}
 
/* ================= TAB SYSTEM ================= */
 
.mw-tab-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
 
.mw-tab-btn {
  padding: 8px 14px;
  background: #111;
  color: #ccc;
  border: 1px solid #444;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}
 
.mw-tab-btn:hover {
  border-color: #00bfff;
  color: #fff;
}
 
.mw-tab-btn.active {
  background: #00bfff;
  color: #000;
}
 
.mw-tab-content {
  display: none;
}
 
.mw-tab-content.active {
  display: block;
}
 
/* ================= DROPDOWN SYSTEM ================= */
 
.mw-dropdown-ui {
  background: #1e1e1e;
  border: 2px solid #444;
  border-radius: 10px;
  padding: 15px;
  margin: 15px 0;
  box-shadow: 0 0 10px rgba(0,0,0,0.6);
  max-width: 600px;
}
 
.mw-dropdown-ui select {
  width: 100%;
  padding: 10px;
  background: #111;
  color: #fff;
  border: 1px solid #666;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 14px;
  cursor: pointer;
}
 
.mw-dropdown-ui select:hover {
  border-color: #00bfff;
}
 
.mw-dropdown-output {
  background: #0d0d0d;
  border: 1px solid #333;
  padding: 12px;
  border-radius: 6px;
  color: #ddd;
}
 
/* ================= CUSTOM DROPDOWN (MOD SYSTEM) ================= */
 
.dropdown-list {
  position: absolute;
  background: #1a1a1a;
  border: 1px solid #444;
  padding: 5px;
  z-index: 9999;
}
 
.dropdown-list div {
  padding: 6px;
  cursor: pointer;
  color: #ccc;
}
 
.dropdown-list div:hover {
  background: #00bfff;
  color: #000;
}
 
/* ================= CLEANUP ================= */
 
/* Only remove legacy broken dropdowns */
.mw-dropdown,
.mw-dropdown-content {
  display: none !important;
}
 
/* Prevent empty containers */
[data-left]:empty,
[data-right]:empty {
  display: none !important;
}
 
/* Remove empty junk blocks safely */
.mw-tab-content div:empty {
  display: none !important;
}
/* ===== MOD STYLE DROPDOWN ===== */
 
.mod-dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
}
 
.mod-dropdown-btn {
  width: 100%;
  padding: 10px;
  background: #111;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}
 
.mod-dropdown-list {
  display: none;
  position: absolute;
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 6px;
  z-index: 9999;
  max-height: 250px;
  overflow-y: auto;
}
 
.mod-dropdown-item {
  padding: 8px;
  cursor: pointer;
  color: #ccc;
}
 
.mod-dropdown-item:hover {
  background: #00bfff;
  color: #000;
}
/* Fix mod dropdown width */
.mod-dropdown {
  max-width: 400px;  /* 👈 adjust this number if you want */
  width: 100%;
}
 
/* Make output box match width */
.mw-dropdown-output {
  max-width: 400px;
}
 
/* Optional: tighten spacing */
.mod-dropdown-btn {
  padding: 8px;
  font-size: 13px;
}
 
.mw-dropdown-output {
  padding: 10px;
  font-size: 13px;
}
/* ================= IMPROVED DROPDOWN UI ================= */


.mw-dropdown-ui {
.mw-dropdown-ui {
Line 231: Line 9:
   box-shadow: 0 0 12px rgba(0,0,0,0.6);
   box-shadow: 0 0 12px rgba(0,0,0,0.6);
   max-width: 420px;
   max-width: 420px;
  position: relative;
}
}


Line 243: Line 22:
}
}


/* Dropdown button */
/* ================= MOD DROPDOWN ================= */
 
.mod-dropdown {
  position: relative; /* REQUIRED for proper dropdown positioning */
  width: 100%;
}
 
/* Button */
.mod-dropdown-btn {
.mod-dropdown-btn {
  width: 100%;
  padding: 10px;
   background: #0f0f0f;
   background: #0f0f0f;
  color: #eee;
   border: 1px solid #444;
   border: 1px solid #444;
   border-radius: 6px;
   border-radius: 6px;
   padding: 10px;
   cursor: pointer;
  text-align: left;
   font-weight: bold;
   font-weight: bold;
  color: #eee;
   transition: 0.2s;
   transition: 0.2s;
}
}
Line 259: Line 48:
}
}


/* Dropdown list */
/* Dropdown list (FIXED SCROLL + POSITION) */
.mod-dropdown-list {
.mod-dropdown-list {
  display: none;
  position: absolute;
  top: 100%;              /* ensures it opens below button */
  left: 0;
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #444;
   border-radius: 6px;
   border-radius: 6px;
   overflow: hidden;
  z-index: 9999;
   margin-top: 4px;
 
  max-height: 250px;      /* 👈 SCROLL LIMIT */
   overflow-y: auto;       /* 👈 ENABLE SCROLL */
   overflow-x: hidden;
}
}


Line 269: Line 68:
.mod-dropdown-item {
.mod-dropdown-item {
   padding: 8px;
   padding: 8px;
  cursor: pointer;
  color: #ccc;
   border-bottom: 1px solid #222;
   border-bottom: 1px solid #222;
   transition: 0.15s;
   transition: 0.15s;
}
.mod-dropdown-item:last-child {
  border-bottom: none;
}
}


Line 285: Line 90:
   padding: 12px;
   padding: 12px;
   border-radius: 6px;
   border-radius: 6px;
  color: #ddd;
   font-size: 13px;
   font-size: 13px;
   line-height: 1.4;
   line-height: 1.4;
}
/* ================= SCROLLBAR ================= */
.mod-dropdown-list::-webkit-scrollbar {
  width: 6px;
}
.mod-dropdown-list::-webkit-scrollbar-thumb {
  background: #00bfff;
  border-radius: 3px;
}
/* ================= SAFETY FIXES ================= */
/* Prevent clipping from parent containers */
.mw-dropdown-ui,
.mod-dropdown {
  overflow: visible !important;
}
}

Revision as of 21:15, 21 April 2026

/* ================= DROPDOWN SYSTEM (FULL FIX) ================= */

.mw-dropdown-ui {
  background: linear-gradient(145deg, #1a1a1a, #111);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 14px;
  margin: 18px 0;
  box-shadow: 0 0 12px rgba(0,0,0,0.6);
  max-width: 420px;
  position: relative;
}

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

/* ================= MOD DROPDOWN ================= */

.mod-dropdown {
  position: relative; /* REQUIRED for proper dropdown positioning */
  width: 100%;
}

/* Button */
.mod-dropdown-btn {
  width: 100%;
  padding: 10px;
  background: #0f0f0f;
  color: #eee;
  border: 1px solid #444;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-weight: bold;
  transition: 0.2s;
}

.mod-dropdown-btn:hover {
  border-color: #00bfff;
  color: #fff;
}

/* Dropdown list (FIXED SCROLL + POSITION) */
.mod-dropdown-list {
  display: none;
  position: absolute;
  top: 100%;              /* ensures it opens below button */
  left: 0;
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 6px;
  z-index: 9999;

  max-height: 250px;      /* 👈 SCROLL LIMIT */
  overflow-y: auto;       /* 👈 ENABLE SCROLL */
  overflow-x: hidden;
}

/* Items */
.mod-dropdown-item {
  padding: 8px;
  cursor: pointer;
  color: #ccc;
  border-bottom: 1px solid #222;
  transition: 0.15s;
}

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

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

/* Output box */
.mw-dropdown-output {
  margin-top: 10px;
  background: #0a0a0a;
  border: 1px solid #222;
  padding: 12px;
  border-radius: 6px;
  color: #ddd;
  font-size: 13px;
  line-height: 1.4;
}

/* ================= SCROLLBAR ================= */

.mod-dropdown-list::-webkit-scrollbar {
  width: 6px;
}

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

/* ================= SAFETY FIXES ================= */

/* Prevent clipping from parent containers */
.mw-dropdown-ui,
.mod-dropdown {
  overflow: visible !important;
}