Khác biệt giữa bản sửa đổi của “MediaWiki:Gadget-dark-mode.css”
Giao diện
Nội dung được xóa Nội dung được thêm vào
nKhông có tóm lược sửa đổi | |||
| Dòng 1: | Dòng 1: | ||
/* WikimediaUI Dark Mode | /* WikimediaUI Dark Mode | ||
* | * | ||
* Wikimedia Design Team 2019- | * Wikimedia Design Team 2019-2021 | ||
* Original authors: | * Original authors: | ||
* - Volker E. – [[User:Volker_E._(WMF)]] | |||
* - Alex Hollender | * - Alex Hollender | ||
* - Volker E. | |||
* - Carolyn Li-Madeo | |||
* - MusikAnimal | * - MusikAnimal | ||
* - Carolyn Li-Madeo | |||
* - Jdlrobson | * - Jdlrobson | ||
* | * | ||
* Original at https://en.wikipedia.org/wiki/User:Volker_E._(WMF)/dark-mode.css | |||
* Last updated: 2020-09-29 | |||
* Version for Gadget CSS skin override usage only. | |||
* Basically removed of all interaction element styles and | |||
* set to `html` instead of JS injected `.client-dark-mode` class. | |||
* | |||
* Last updated: 2021-04-20 | |||
* | * | ||
*/ | */ | ||
/** To prevent 'jumping' effect within #p-personal in Vector/Monobook. Overrides [[MediaWiki:Gadget-dark-mode-toggle-pagestyles.css]] **/ | |||
/* Would be nice if it were that easy. Will have to find opposite color for invert filter to make it dark | |||
body.skin-vector-legacy :not(#pt-darkmode) + #pt-watchlist::before, | |||
body.skin-monobook :not(#pt-darkmode) + #pt-watchlist::before { | |||
content: "Light mode"; | |||
} | |||
@media screen { | |||
/* set height for monobook and timeless, because the filter in FF needs dimensions to get it to apply */ | |||
html { | html { | ||
height: 100%; | |||
background-color: #000; | |||
} | } | ||
*/ | |||
/* Filter needs to reside on ` | /* Filter needs to reside on `html`, see https://phabricator.wikimedia.org/T221425#5153917 */ | ||
html, | html, | ||
/* All other selectors have `filter` double-applied to turn back to “normal” by inheritance */ | /* All other selectors have `filter` double-applied to turn back to “normal” by inheritance */ | ||
html img, | html img, | ||
html video, | html video, | ||
html | html ogvjs, | ||
html | html svg, | ||
html iframe, | |||
html .mw-no-invert, | |||
html td .diffchange, | |||
html .mwe-math-element, | html .mwe-math-element, | ||
html .wvui-typeahead-suggestion__thumbnail, | |||
html .skin-minerva .mw-notification-visible .mw-notification-content, | |||
/* Extensions */ | /* Extensions */ | ||
html .cdx-menu-item__thumbnail, /* T311835 */ | |||
html .skin-minerva .mw-overlays-container .media-viewer, | |||
html .cx-slitem__image, | html .cx-slitem__image, | ||
html .mw-mmv-overlay, | html .mw-mmv-overlay, | ||
html .mw-mmv-pre-image, | html .mw-mmv-pre-image, | ||
html .media-viewer .image img, | |||
html .mw-kartographer-map, | |||
html .media-viewer .mw-file-description img, | |||
html .mw-kartographer-map, | |||
html .mw-kartographer-mapDialog-map, | html .mw-kartographer-mapDialog-map, | ||
html .ext-related-articles-card-list .ext-related-articles-card-thumb, | |||
html .list-thumb, | html .list-thumb, | ||
html .ext-related-articles-card-list .ext-related-articles-card-thumb { | |||
html .mw-logo-container, | |||
filter: invert( 1 ) hue-rotate( 180deg ); | |||
/* Các class của Trang nhà */ | |||
} | |||
html .se-card-image, | |||
html .real-image, | |||
/* Reset overrides, needed where double application above isn't working. */ | |||
/* Thumbnail của search box Vector mới */ | |||
/* Vector modern */ | |||
html .wvui-typeahead-suggestion__thumbnail, | |||
html .skin-vector .mw-logo-wordmark, | |||
/* Hình đang load trong Viewer */ | |||
html .skin-vector .mw-logo-tagline, | |||
html .mw-mmv-placeholder-image.blurred { | |||
html .skin-timeless .mw-wiki-title > img, | |||
filter: invert( 1 ) hue-rotate( 180deg ) !important; | |||
html .wvui-icon svg { | |||
filter: none; | |||
} | } | ||
| Dòng 57: | Dòng 76: | ||
html .toc, | html .toc, | ||
html .thumbinner, | html .thumbinner, | ||
html figure[typeof~='mw:File/Thumb'], | |||
html figure[typeof~='mw:File/Frame'], | |||
html figure[typeof~='mw:File/Thumb'] > figcaption, | |||
html figure[typeof~='mw:File/Frame'] > figcaption, | |||
html .wikitable, | html .wikitable, | ||
html .cbnnr-main, | html .cbnnr-main, | ||
html .cx-callout, | html .cx-callout, | ||
html .overlay.media-viewer, | |||
html #simpleSearch, | html #simpleSearch, | ||
html #simpleSearch #searchInput, | html #simpleSearch #searchInput, | ||
| Dòng 80: | Dòng 104: | ||
html .toc, | html .toc, | ||
html .thumbinner, | html .thumbinner, | ||
html figure[typeof~='mw:File/Thumb'], | |||
html figure[typeof~='mw:File/Frame'], | |||
html figure[typeof~='mw:File/Thumb'] > figcaption, | |||
html figure[typeof~='mw:File/Frame'] > figcaption, | |||
html #mw-head, | html #mw-head, | ||
html #mw-panel, | html #mw-panel, | ||
/* Vector 2022 uses a transparent border for margin collapsing | |||
html #content.mw-body, | |||
(T312822) so don't apply this rule there */ | |||
.skin-vector-legacy #content.mw-body, | |||
html #simpleSearch, | html #simpleSearch, | ||
html #simpleSearch #searchInput, | html #simpleSearch #searchInput, | ||
html #siteNotice #centralNotice .cnotice | html #siteNotice #centralNotice .cnotice { | ||
html .skin-vector-search-vue .mw-footer { | |||
border-color: #cdcbc8; | border-color: #cdcbc8; | ||
} | } | ||
| Dòng 92: | Dòng 121: | ||
/* Links */ | /* Links */ | ||
/* Links: normal */ | /* Links: normal */ | ||
html a, | |||
/*html .skin-vector a,*/ | |||
html .vector-menu-tabs li a, | html .vector-menu-tabs li a, | ||
/* Backwards compatible VectorTabs, deprecated in MW v1.35. */ | /* Backwards compatible VectorTabs, deprecated in MW v1.35. */ | ||
| Dòng 102: | Dòng 130: | ||
html .mw-parser-output a.extiw:active, | html .mw-parser-output a.extiw:active, | ||
html #mw-panel .portal .body li a { | html #mw-panel .portal .body li a { | ||
/* color: #69f; Proposal below for level AA conformance, see also https://phabricator.wikimedia.org/T233266 | /* color: #69f; Proposal below for level AA conformance, see also https://phabricator.wikimedia.org/T233266 | ||
`#36c` is transformed by :root `filter` to be closer to chosen `#69f`. */ | `#36c` is transformed by :root `filter` to be closer to chosen `#69f`. */ | ||
color: #36c; | color: #36c; | ||
| Dòng 113: | Dòng 141: | ||
/* color: #709bbd; Proposal below uses to-be-standardized color from https://phabricator.wikimedia.org/T213778 */ | /* color: #709bbd; Proposal below uses to-be-standardized color from https://phabricator.wikimedia.org/T213778 */ | ||
color: #6b4ba1; | color: #6b4ba1; | ||
} | |||
/* Links: active */ | |||
html a:active { | |||
color: #2c2700 !important; | |||
} | } | ||
| Dòng 124: | Dòng 147: | ||
html .vector-menu-tabs li.new a, | html .vector-menu-tabs li.new a, | ||
html .vectorTabs li.new a { | html .vectorTabs li.new a { | ||
color: #ff6e6e; | |||
/*color: #e35d5d;*/ | |||
color: #b63e3e; | |||
} | } | ||
/* ::: Special Element Treatments ::: */ | /* ::: Special Element Treatments ::: */ | ||
/* Image thumbnails */ | /* Image thumbnails */ | ||
html .thumbimage | html .thumbimage, | ||
html figure[typeof~='mw:File/Thumb'] > *:first-child > *:first-child:not( .mw-broken-media ), | |||
html figure[typeof~='mw:File/Frame'] > *:first-child > *:first-child:not( .mw-broken-media ) { | |||
border: 0; | border: 0; | ||
} | } | ||
| Dòng 137: | Dòng 160: | ||
/* Content image (thumbnail) SVGs */ | /* Content image (thumbnail) SVGs */ | ||
/* `*not( .mbox-image )` exception doesn't work for unclear reasons */ | /* `*not( .mbox-image )` exception doesn't work for unclear reasons */ | ||
html .image img[ src*='svg' ] | html .image img[ src*='svg' ], | ||
html .mw-file-description img[ src*='svg' ], | |||
background-color: #eee; | |||
html img[ src*='Wiktionary-logo'] { | |||
background-color: #fff; | |||
border-radius: 1px; | border-radius: 1px; | ||
} | } | ||
| Dòng 145: | Dòng 170: | ||
html .mw-echo-ui-notificationItemWidget-icon img[ src*='svg' ], | html .mw-echo-ui-notificationItemWidget-icon img[ src*='svg' ], | ||
html .mbox-image .image img[ src*='svg' ], | html .mbox-image .image img[ src*='svg' ], | ||
html .mbox-image .mw-file-description img[ src*='svg' ], | |||
/* Emoji generated by [[Template:Emoji]] */ | |||
html .emoji .image img, | |||
html .emoji .mw-file-description img, | |||
/* Vote symbols on Talk pages */ | /* Vote symbols on Talk pages */ | ||
html .image img[ alt^="Symbol" ] | html .image img[ alt^="Symbol" ], | ||
html .mw-file-description img[ alt^="Symbol" ] { | |||
background-color: transparent; | background-color: transparent; | ||
} | } | ||
| Dòng 153: | Dòng 183: | ||
html .mwe-popups { | html .mwe-popups { | ||
box-shadow: 0 30px 90px -20px rgba( 0, 0, 0, 0.3 ), 0 0 1px #000; | box-shadow: 0 30px 90px -20px rgba( 0, 0, 0, 0.3 ), 0 0 1px #000; | ||
} | |||
html .mwe-popups .mwe-popups-extract[ dir='ltr' ]:after { | |||
background-image: -webkit-linear-gradient( 90deg, rgba( 221, 221, 221, 0 ), #ddd 50% ); | |||
background-image: -moz-linear-gradient( 90deg, rgba( 221, 221, 221, 0 ), #ddd 50% ); | |||
background-image: linear-gradient( 90deg, rgba( 221, 221, 221, 0 ), #ddd 50% ); | |||
} | } | ||
| Dòng 173: | Dòng 197: | ||
html .cx-callout-1:after { | html .cx-callout-1:after { | ||
border-bottom-color: #ddd; | border-bottom-color: #ddd; | ||
} | |||
/* ::: Skin specific rules ::: */ | |||
/* Wikipedia globe fix */ | |||
/*.skin-vector #p-logo.mw-no-invert,*/ | |||
/*.skin-timeless #p-logo.mw-no-invert {*/ | |||
/* position: absolute;*/ | |||
/* top: 0;*/ | |||
/* height: 112px;*/ | |||
/* overflow: hidden;*/ | |||
/*}*/ | |||
/* Timeless globe fix */ | |||
.skin-timeless #mw-site-navigation { | |||
position: relative; | |||
} | |||
.skin-timeless #p-logo.mw-no-invert { | |||
left: 1em; | |||
height: 124px; | |||
} | } | ||
/* Mobile Wikipedia logo mobile header */ | /* Mobile Wikipedia logo mobile header */ | ||
html .branding-box img { | html .branding-box img { | ||
filter: brightness( 0 ) | filter: brightness( 0 ); | ||
} | } | ||
/* Tweak by P.T.Đ */ | |||
html { | |||
text-rendering: optimizeSpeed; | |||
-webkit-font-smoothing: antialiased; | |||
} | |||
/* .skin-vector, | |||
html .skin-vector input[type="text"], | |||
html .skin-vector input[type="search"], | |||
html .skin-vector textarea, | |||
html .skin-vector select */ | |||
html * { | |||
text-shadow: 0 0 0; | |||
} | |||
html .skin-vector #content .mw-changeslist table tr { | |||
filter: contrast(1) saturate(1.5); | |||
} | |||
html #content { | |||
/* background: #eaeaea; */ | |||
background: #dcdcdc; | |||
/*opacity: 0.98;*/ | |||
} | |||
html body.skin-vector-legacy .vector-menu-tabs .selected { | |||
background: linear-gradient(#fff, #dcdcdc); | |||
} | |||
html *::selection { | |||
/* background: #bbb; */ | |||
/* background: #48e3dc; */ | |||
/*background: #8ab7cd;*/ | |||
background: #6da2d9; | |||
} | |||
html .image img[ src*='png' ], | |||
html .image img[ src*='gif' ]{ | |||
background-color: #eee; | |||
} | |||
/* Vector */ | |||
html .skin-vector { | |||
/*font-family: -apple-system, 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Lato', 'Helvetica', 'Arial', sans-serif;*/ | |||
} | |||
html .skin-vector #content #mw-content-text, | |||
html .skin-vector .ve-init-mw-target-surface { | |||
/*font-size: 1.05em;*/ | |||
/* line-height: 1.65;*/ | |||
} | |||
html .skin-vector .not-patrolled { | |||
background-color: #d6d68c; | |||
} | |||
html .skin-vector #p-logo a { | |||
filter: invert(1) drop-shadow(0 0 0.01px #222); | |||
background-image: url(//upload.wikimedia.org/wikipedia/commons/5/5d/Wikipedia-logo-v2-vi-white-half.svg) !important; | |||
} | |||
html .skin-vector #cx-header__wordmark, | |||
html #mw-content-text span.haudio img, | |||
html .skin-vector #mp-topbanner img[alt="WikipediA"] { | |||
filter: brightness(0); | |||
} | |||
/* Mobile */ | |||
html .skin-minerva .mw-notification-content, | |||
html .skin-minerva .minerva-footer .footer-content > h2 > img { | |||
filter: brightness(0) !important; | |||
} | |||
html .skin-minerva .minerva-footer .footer-content > h2 > img { | |||
position: relative; | |||
z-index: 1; | |||
} | |||
html .skin-minerva #mw-mf-diffview #mw-mf-userinfo { | |||
z-index: 2; | |||
} | |||
/* Main Page */ | |||
@media (min-width: 576px) { | |||
html .page-Trang_Chính .main-header, | |||
html .page-Trang_Chính .main-box { | |||
background-color: #ccc !important; | |||
} | |||
html .page-Trang_Chính .main-header__bottom { | |||
background-color: #ddd !important; | |||
} | |||
} | |||
@media (min-width: 1200px) { | |||
html .main-header__left { | |||
background-image: linear-gradient(to right,#ccc 0%,#ccc 80%,rgba(248,249,250,0) 100%) !important; | |||
} | |||
} | |||
/* Diff */ | |||
html .diff-deletedline .diffchange, | |||
html del.popupDiff { | |||
background: #c5ac72; | |||
} | |||
html .diff-addedline .diffchange, | |||
html ins.popupDiff { | |||
background: #79a8d5; | |||
} | |||
html .diff-deletedline { | |||
background: #ccc; | |||
border-color: #c5ac72; | |||
} | |||
html .diff-addedline { | |||
background: #ccc; | |||
border-color: #79a8d5; | |||
} | |||
/* Popups */ | |||
html .navpopup { | |||
background-color: #dcdcdc; | |||
} | |||
/* Fix New Vector */ | |||
html .skin-vector-search-vue .mw-body { | |||
padding: 1.25em 1.0em 1.5em; | |||
} | |||
html .skin-vector-search-vue .mw-sidebar { | |||
border-right: none !important; | |||
} | |||
/* Fix */ | |||
.mw-pulsating-dot { | |||
z-index: 1; | |||
} | |||
.unfilter, | |||
/* Fix Minerva */ | |||
.mw-overlays-container .image-loaded { | |||
filter: invert(0) !important; | |||
} | } | ||
| Dòng 350: | Dòng 210: | ||
background: #000; | background: #000; | ||
} | } | ||
} | |||
@-moz-document url-prefix() { | |||
@supports (overflow-clip-margin: 1px) { | |||
body { | |||
background: #fff; | |||
} | |||
} | |||
} | } | ||
Phiên bản lúc 00:28, ngày 8 tháng 3 năm 2023
/* WikimediaUI Dark Mode * * Wikimedia Design Team 2019-2021 * Original authors: * - Volker E. – [[User:Volker_E._(WMF)]] * - Alex Hollender * - MusikAnimal * - Carolyn Li-Madeo * - Jdlrobson * * Original at https://en.wikipedia.org/wiki/User:Volker_E._(WMF)/dark-mode.css * Version for Gadget CSS skin override usage only. * Basically removed of all interaction element styles and * set to `html` instead of JS injected `.client-dark-mode` class. * * Last updated: 2021-04-20 * *//** To prevent 'jumping' effect within #p-personal in Vector/Monobook. Overrides [[MediaWiki:Gadget-dark-mode-toggle-pagestyles.css]] **/body.skin-vector-legacy :not(#pt-darkmode) + #pt-watchlist::before,body.skin-monobook :not(#pt-darkmode) + #pt-watchlist::before { content: "Light mode";}@media screen { /* set height for monobook and timeless, because the filter in FF needs dimensions to get it to apply */html { height: 100%;}/* Filter needs to reside on `html`, see https://phabricator.wikimedia.org/T221425#5153917 */html,/* All other selectors have `filter` double-applied to turn back to “normal” by inheritance */html img,html video,html ogvjs,html svg,html iframe,html .mw-no-invert,html td .diffchange,html .mwe-math-element,html .wvui-typeahead-suggestion__thumbnail,html .skin-minerva .mw-notification-visible .mw-notification-content,/* Extensions */html .cdx-menu-item__thumbnail, /* T311835 */html .cx-slitem__image,html .mw-mmv-overlay,html .mw-mmv-pre-image,html .media-viewer .image img,html .media-viewer .mw-file-description img,html .mw-kartographer-map,html .mw-kartographer-mapDialog-map,html .list-thumb,html .ext-related-articles-card-list .ext-related-articles-card-thumb { filter: invert( 1 ) hue-rotate( 180deg );}/* Reset overrides, needed where double application above isn't working. *//* Vector modern */html .skin-vector .mw-logo-wordmark,html .skin-vector .mw-logo-tagline,html .skin-timeless .mw-wiki-title > img,html .wvui-icon svg { filter: none;}/* Backgrounds */html table,html table.ambox-content,html table.toccolours,html .mw-notification,html .mwe-popups,html .infobox,html .toc,html .thumbinner,html figure[typeof~='mw:File/Thumb'],html figure[typeof~='mw:File/Frame'],html figure[typeof~='mw:File/Thumb'] > figcaption,html figure[typeof~='mw:File/Frame'] > figcaption,html .wikitable,html .cbnnr-main,html .cx-callout,html .overlay.media-viewer,html #simpleSearch,html #simpleSearch #searchInput,html #siteNotice #centralNotice .cnotice { background-color: #ddd;}/* Borders */html body,html h1,html h2,html h3,html h4,html h5,html h6,html table.ambox-content,html table.toccolours,html .mw-notification,html .infobox,html .toc,html .thumbinner,html figure[typeof~='mw:File/Thumb'],html figure[typeof~='mw:File/Frame'],html figure[typeof~='mw:File/Thumb'] > figcaption,html figure[typeof~='mw:File/Frame'] > figcaption,html #mw-head,html #mw-panel,/* Vector 2022 uses a transparent border for margin collapsing(T312822) so don't apply this rule there */.skin-vector-legacy #content.mw-body,html #simpleSearch,html #simpleSearch #searchInput,html #siteNotice #centralNotice .cnotice { border-color: #cdcbc8;}/* Links *//* Links: normal */html a,html .vector-menu-tabs li a,/* Backwards compatible VectorTabs, deprecated in MW v1.35. */html .vectorTabs li a,html .toctogglelabel,html .mw-parser-output a.external,html .mw-parser-output a.extiw,html .mw-parser-output a.extiw:active,html #mw-panel .portal .body li a { /* color: #69f; Proposal below for level AA conformance, see also https://phabricator.wikimedia.org/T233266 `#36c` is transformed by :root `filter` to be closer to chosen `#69f`. */ color: #36c;}/* Links: visited */html a:visited,html .mw-parser-output a.extiw:visited,html #mw-panel .portal .body li a:visited { /* color: #709bbd; Proposal below uses to-be-standardized color from https://phabricator.wikimedia.org/T213778 */ color: #6b4ba1;}/* Links: red */html a.new,html .vector-menu-tabs li.new a,html .vectorTabs li.new a { color: #ff6e6e;}/* ::: Special Element Treatments ::: *//* Image thumbnails */html .thumbimage,html figure[typeof~='mw:File/Thumb'] > *:first-child > *:first-child:not( .mw-broken-media ),html figure[typeof~='mw:File/Frame'] > *:first-child > *:first-child:not( .mw-broken-media ) { border: 0;}/* Content image (thumbnail) SVGs *//* `*not( .mbox-image )` exception doesn't work for unclear reasons */html .image img[ src*='svg' ],html .mw-file-description img[ src*='svg' ],html img[ src*='Wiktionary-logo'] { background-color: #fff; border-radius: 1px;}/* Dealing with false positives from selector above */html .mw-echo-ui-notificationItemWidget-icon img[ src*='svg' ],html .mbox-image .image img[ src*='svg' ],html .mbox-image .mw-file-description img[ src*='svg' ],/* Emoji generated by [[Template:Emoji]] */html .emoji .image img,html .emoji .mw-file-description img,/* Vote symbols on Talk pages */html .image img[ alt^="Symbol" ],html .mw-file-description img[ alt^="Symbol" ] { background-color: transparent;}/* Page previews */html .mwe-popups { box-shadow: 0 30px 90px -20px rgba( 0, 0, 0, 0.3 ), 0 0 1px #000;}html .mwe-popups.flipped-y:after,html .mwe-popups.flipped-x-y:after { border-top: 11px solid #ddd;}html .mwe-popups.mwe-popups-no-image-pointer:after { border-bottom: 11px solid #ddd;}/* Contributions menu */html .cx-callout-1:after { border-bottom-color: #ddd;}/* Mobile Wikipedia logo mobile header */html .branding-box img { filter: brightness( 0 );}}@-moz-document url-prefix() { body { background: #000; }}@-moz-document url-prefix() { @supports (overflow-clip-margin: 1px) { body { background: #fff; } }}