MediaWiki:Common.css

From Tibia Idle wiki

Revision as of 08:36, 11 July 2025 by Admin (talk | contribs)

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.
/* ================================
   GLOBALNY WRAPPER DLA ZAWARTOŚCI
   ================================ */
.mw-body-content .mw-parser-output {
  padding: 0 1em; /* trochę po bokach, żeby nic się nie przyklejało */
}

/* ================
   BAZA DLA TABEL
   ================ */
table.infobox,
.wikitable {
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  margin: 1.5em auto;
  overflow: hidden;
  width: auto;       /* pozwalamy naturalnej szerokości */
  max-width: 100%;   /* nie wychodzić poza kontener */
}

/* WSPÓLNE KOMÓRKI */
table.infobox td,
.wikitable th,
.wikitable td {
  padding: 0.6em 1em;
  vertical-align: middle;
  white-space: nowrap;
}

/* NAGŁÓWKI WIKITABLE */
.wikitable th {
  background: #f0f8ff;
  color: #1a5dab;
  font-weight: bold;
  border-bottom: 2px solid #1a5dab;
}

/* PARY WIKITABLE */
.wikitable tr:nth-child(even) { background: #f9fcff; }
.wikitable tr:nth-child(odd)  { background: #ffffff; }
.wikitable tr:hover            { background: #e6f0ff; }

/* LINKI */
.infobox a,
.infobox a:visited,
.wikitable a,
.wikitable a:visited {
  color: #1a5dab;
  text-decoration: none;
}
.infobox a:hover,
.wikitable a:hover {
  text-decoration: underline;
}

/* ZAOKRĄGLENIA */
.infobox th:first-child,
.wikitable th:first-child { border-top-left-radius: 12px; }
.infobox th:last-child,
.wikitable th:last-child  { border-top-right-radius: 12px; }
.infobox tr:last-child td:first-child,
.wikitable tr:last-child td:first-child   { border-bottom-left-radius: 12px; }
.infobox tr:last-child td:last-child,
.wikitable tr:last-child td:last-child    { border-bottom-right-radius: 12px; }


/* ======================
   RESPONSYWNE PRZEWIJANIE
   ====================== */
@media screen and (max-width: 768px) {

  /* Infoboxy (100% szerokości minus padding) */
  table.infobox {
    display: block;
    overflow-x: auto;
    width: calc(100% + 2em);
    margin: 1em -1em;  /* wystawiamy na cały kontener z wrappera */
    box-shadow: none;
  }

  /* Wikitable z przewijaniem i centrowane */
  .wikitable {
    display: block;
    overflow-x: auto;
    margin: 1em auto;
    padding: 0 0.5em;
  }

  /* Komórki nie zmieniają paddingu, bierzemy powyższe */
  table.infobox td,
  .wikitable th,
  .wikitable td {
    white-space: nowrap;
  }
}