MediaWiki:Common.css: Różnice pomiędzy wersjami
Przejdź do nawigacji
Przejdź do wyszukiwania
Nie podano opisu zmian Znacznik: Wycofane |
Nie podano opisu zmian Znacznik: Wycofane |
||
| Linia 1: | Linia 1: | ||
/* Umieszczony tutaj kod CSS zostanie zastosowany we wszystkich skórkach */ | /* Umieszczony tutaj kod CSS zostanie zastosowany we wszystkich skórkach */ | ||
.client- | /* --- 1) elementy, którym ręcznie dodasz class=mw-no-invert --- */ | ||
.client-dark- | /* pre-invertujemy je (tak, pre-invert — bo html jest już invertowany) */ | ||
filter: | .client-darkmode .mw-no-invert, | ||
.client-darkmode img.mw-no-invert, | |||
.client-darkmode .mw-no-invert img { | |||
filter: invert(1) hue-rotate(180deg) !important; | |||
-webkit-filter: invert(1) hue-rotate(180deg) !important; | |||
/* przyda się przy niektórych skinach */ | |||
mix-blend-mode: normal !important; | |||
} | |||
/* --- 2) logo ustawione przez $wgLogos w LocalSettings.php --- */ | |||
/* dopasuj selektory jeśli Twoja skórka używa innych klas/id */ | |||
.client-darkmode #p-logo img, | |||
.client-darkmode .mw-wiki-logo, | |||
.client-darkmode .site-logo, | |||
.client-darkmode .mw-logo { | |||
/* pre-invertujemy, aby skompensować filtr aplikowany na html */ | |||
filter: invert(1) hue-rotate(180deg) !important; | |||
-webkit-filter: invert(1) hue-rotate(180deg) !important; | |||
mix-blend-mode: normal !important; | |||
opacity: 1 !important; | |||
} | |||
/* --- 3) Jeżeli masz czarne podpisy/sygnatury, które trzeba *odwrócić* w dark mode */ | |||
/* (użyj class=skin-invert lub class=skin-invert-image na [[File:...]] ) */ | |||
.client-darkmode .skin-invert, | |||
.client-darkmode img.skin-invert { | |||
filter: invert(1) hue-rotate(180deg) !important; | |||
-webkit-filter: invert(1) hue-rotate(180deg) !important; | |||
} | |||
/* jeśli potrzebujesz, by cały blok był wyłączony z "themingu" */ | |||
.client-darkmode .notheme, | |||
.client-darkmode .notheme * { | |||
/* tutaj możesz wymusić oryginalne kolory (ale uwaga: rodzic może nadal inwertować) */ | |||
filter: invert(1) hue-rotate(180deg) !important; | |||
-webkit-filter: invert(1) hue-rotate(180deg) !important; | |||
} | } | ||
Wersja z 19:47, 11 wrz 2025
/* Umieszczony tutaj kod CSS zostanie zastosowany we wszystkich skórkach */
/* --- 1) elementy, którym ręcznie dodasz class=mw-no-invert --- */
/* pre-invertujemy je (tak, pre-invert — bo html jest już invertowany) */
.client-darkmode .mw-no-invert,
.client-darkmode img.mw-no-invert,
.client-darkmode .mw-no-invert img {
filter: invert(1) hue-rotate(180deg) !important;
-webkit-filter: invert(1) hue-rotate(180deg) !important;
/* przyda się przy niektórych skinach */
mix-blend-mode: normal !important;
}
/* --- 2) logo ustawione przez $wgLogos w LocalSettings.php --- */
/* dopasuj selektory jeśli Twoja skórka używa innych klas/id */
.client-darkmode #p-logo img,
.client-darkmode .mw-wiki-logo,
.client-darkmode .site-logo,
.client-darkmode .mw-logo {
/* pre-invertujemy, aby skompensować filtr aplikowany na html */
filter: invert(1) hue-rotate(180deg) !important;
-webkit-filter: invert(1) hue-rotate(180deg) !important;
mix-blend-mode: normal !important;
opacity: 1 !important;
}
/* --- 3) Jeżeli masz czarne podpisy/sygnatury, które trzeba *odwrócić* w dark mode */
/* (użyj class=skin-invert lub class=skin-invert-image na [[File:...]] ) */
.client-darkmode .skin-invert,
.client-darkmode img.skin-invert {
filter: invert(1) hue-rotate(180deg) !important;
-webkit-filter: invert(1) hue-rotate(180deg) !important;
}
/* jeśli potrzebujesz, by cały blok był wyłączony z "themingu" */
.client-darkmode .notheme,
.client-darkmode .notheme * {
/* tutaj możesz wymusić oryginalne kolory (ale uwaga: rodzic może nadal inwertować) */
filter: invert(1) hue-rotate(180deg) !important;
-webkit-filter: invert(1) hue-rotate(180deg) !important;
}