用户:Shio/common.css
来自ThunionWiki
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
- Opera:按 Ctrl-F5。
@media (prefers-color-scheme: dark),
html[data-user-theme="dark"] {
/* 颜色变量 */
:root {
--dark-bg: #0c0d10;
--dark-surface: #14161a;
--dark-border: #25282d;
--dark-text: #e8edf3;
--dark-muted: #a0a7b2;
--dark-link: #6fb3ff;
--dark-link-visited: #9aaeea;
--dark-highlight: #20242b;
}
html, body {
background-color: var(--dark-bg) !important;
color: var(--dark-text) !important;
}
#mw-content-text, .mw-body {
background-color: var(--dark-bg) !important;
color: var(--dark-text) !important;
}
.mw-body-content, #mw-content, #content {
background: var(--dark-bg) !important;
color: var(--dark-text) !important;
}
#mw-header, #mw-site-navigation, #mw-related-navigation, #mw-personal, #mw-page-header {
background-color: var(--dark-surface) !important;
border-color: var(--dark-border) !important;
color: var(--dark-text) !important;
}
a, a:link {
color: var(--dark-link) !important;
}
a:visited {
color: var(--dark-link-visited) !important;
}
a:hover, a:focus {
text-decoration: underline !important;
filter: brightness(1.1);
}
table, .wikitable {
background-color: transparent !important;
border-color: var(--dark-border) !important;
color: var(--dark-text) !important;
}
.wikitable th {
background-color: var(--dark-highlight) !important;
}
pre, code, tt {
background-color: #121417 !important;
color: var(--dark-text) !important;
border: 1px solid var(--dark-border) !important;
}
blockquote {
border-left: 3px solid var(--dark-border) !important;
color: var(--dark-muted) !important;
}
input, textarea, select, button {
background-color: var(--dark-surface) !important;
color: var(--dark-text) !important;
border: 1px solid var(--dark-border) !important;
}
#mw-footer, .site-footer {
background-color: var(--dark-surface) !important;
color: var(--dark-muted) !important;
border-top: 1px solid var(--dark-border) !important;
}
.infobox, .messagebox, .mw-warning {
background-color: var(--dark-highlight) !important;
color: var(--dark-text) !important;
border-color: var(--dark-border) !important;
}
img, svg, video {
filter: none !important;
background: transparent !important;
}
[style*="background-color:#fff"],
[style*="background-color: white"] {
background-color: transparent !important;
}
.infobox, .wikitable, .messagebox, .mw-body {
border-radius: 8px !important;
}
}