MediaWiki:Common.css: Difference between revisions
From Tibia Idle wiki
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
Line 1: | Line 1: | ||
/* | /* ================================ | ||
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 { | .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 th, | ||
.wikitable td { | .wikitable td { | ||
padding: 0.6em 1em; | |||
vertical-align: middle; | |||
white-space: nowrap; | |||
} | } | ||
/* NAGŁÓWKI WIKITABLE */ | |||
.wikitable th { | .wikitable th { | ||
background: #f0f8ff; | |||
color: #1a5dab; | |||
font-weight: bold; | |||
border-bottom: 2px solid #1a5dab; | |||
} | } | ||
.wikitable tr:nth-child(even) { background: # | /* PARY WIKITABLE */ | ||
.wikitable tr:nth-child(odd) { background: # | .wikitable tr:nth-child(even) { background: #f9fcff; } | ||
.wikitable tr:hover { background: # | .wikitable tr:nth-child(odd) { background: #ffffff; } | ||
.wikitable tr:hover { background: #e6f0ff; } | |||
/* LINKI */ | |||
.infobox a, | |||
.infobox a:visited, | |||
.wikitable a, | .wikitable a, | ||
.wikitable a:visited { | .wikitable a:visited { | ||
color: #1a5dab; | |||
text-decoration: none; | |||
} | } | ||
.infobox a:hover, | |||
.wikitable a:hover { | .wikitable a:hover { | ||
text-decoration: underline; | |||
} | } | ||
.wikitable th:first-child | /* ZAOKRĄGLENIA */ | ||
.wikitable th:last-child | .infobox th:first-child, | ||
.wikitable tr:last-child td:first-child | .wikitable th:first-child { border-top-left-radius: 12px; } | ||
.wikitable tr:last-child td:last-child | .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 { | table.infobox { | ||
display: block | display: block; | ||
overflow-x: auto | 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, | ||
table. | .wikitable th, | ||
.wikitable td { | |||
white-space: nowrap; | |||
} | |||
. | |||
} | } |
Revision as of 08:36, 11 July 2025
/* ================================ 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; } }