[themes/default] dark mode, see #937
This commit is contained in:
parent
9c0a6ebec3
commit
8065d5ea6b
1 changed files with 76 additions and 32 deletions
|
@ -1,42 +1,83 @@
|
||||||
|
:root {
|
||||||
|
--page: #EEE;
|
||||||
|
--text: #000;
|
||||||
|
--link-default: #0000EE;
|
||||||
|
--link-visited: #551A8B;
|
||||||
|
|
||||||
|
--title: #BBB;
|
||||||
|
--title-border: #AAA;
|
||||||
|
|
||||||
|
--header: #CCC;
|
||||||
|
--header-border: #BBB;
|
||||||
|
|
||||||
|
--block: #DDD;
|
||||||
|
--block-border: #CCC;
|
||||||
|
|
||||||
|
--zebra-border: #CCC;
|
||||||
|
--zebra-header: #DDD;
|
||||||
|
--zebra-odd: #EFEFEF;
|
||||||
|
--zebra-even: #E0E0E0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
--page: #222;
|
||||||
|
--text: #CCC;
|
||||||
|
--link-default: #AAE;
|
||||||
|
--link-visited: #DAE;
|
||||||
|
|
||||||
|
--title: #222;
|
||||||
|
--title-border: #444;
|
||||||
|
|
||||||
|
--header: #333;
|
||||||
|
--header-border: #555;
|
||||||
|
|
||||||
|
--block: #444;
|
||||||
|
--block-border: #666;
|
||||||
|
|
||||||
|
--zebra-border: #777;
|
||||||
|
--zebra-header: #444;
|
||||||
|
--zebra-odd: #555;
|
||||||
|
--zebra-even: #666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
* things common to all pages *
|
* things common to all pages *
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||||
|
|
||||||
BODY {
|
BODY {
|
||||||
background: #EEE;
|
background: var(--page);
|
||||||
|
color: var(--text);
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
H1 {
|
H1 {
|
||||||
background: #BBB;
|
background: var(--title);
|
||||||
|
border: 1px solid var(--title-border);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 1px solid #AAA;
|
|
||||||
}
|
}
|
||||||
H1 A {
|
H1 A {
|
||||||
color: black;
|
color: var(--text);
|
||||||
}
|
}
|
||||||
H3 {
|
H3 {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
SECTION>H3 {
|
SECTION>H3 {
|
||||||
background: #CCC;
|
background: var(--header);
|
||||||
border: 1px solid #BBB;
|
border: 1px solid var(--header-border);
|
||||||
}
|
}
|
||||||
SECTION>.blockbody, .comment, .setupblock {
|
SECTION>.blockbody, .comment, .setupblock {
|
||||||
background: #DDD;
|
background: var(--block);
|
||||||
border: 1px solid #CCC;
|
border: 1px solid var(--block-border);
|
||||||
}
|
}
|
||||||
SECTION>.blockbody, H1, SECTION>H3, FOOTER, .comment, .setupblock {
|
SECTION>.blockbody, H1, SECTION>H3, FOOTER, .comment, .setupblock {
|
||||||
margin: 8px;
|
margin: 8px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
border-radius: 12px; /* standard, webkit, opera */
|
border-radius: 12px;
|
||||||
-moz-border-radius: 12px; /* mozilla haven't committed yet */
|
box-shadow: 2px 2px 6px rgba(0,0,0,0.6);
|
||||||
box-shadow: 2px 2px 6px rgba(0,0,0,0.6); /* standard, opera */
|
|
||||||
-webkit-box-shadow: 2px 2px 6px rgba(0,0,0,0.6); /* webkit haven't committed yet */
|
|
||||||
-moz-box-shadow: 2px 2px 6px rgba(0,0,0,0.6); /* mozilla haven't committed yet */
|
|
||||||
}
|
}
|
||||||
THEAD {
|
THEAD {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
@ -46,24 +87,32 @@ TD {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
TABLE.zebra {border-spacing: 0; border: 2px solid #CCC;}
|
TABLE.zebra {border-spacing: 0; border: 2px solid var(--zebra-border);}
|
||||||
TABLE.zebra TD, TABLE.zebra TH {vertical-align: middle; padding: 4px;}
|
TABLE.zebra TD, TABLE.zebra TH {vertical-align: middle; padding: 4px;}
|
||||||
TABLE.zebra THEAD TD, TABLE.zebra THEAD TH {border-bottom: 2px solid #CCC;}
|
TABLE.zebra THEAD TD, TABLE.zebra THEAD TH {border-bottom: 2px solid var(--zebra-border);}
|
||||||
TABLE.zebra TFOOT TD, TABLE.zebra TFOOT TH {border-top: 2px solid #CCC;}
|
TABLE.zebra TFOOT TD, TABLE.zebra TFOOT TH {border-top: 2px solid var(--zebra-border);}
|
||||||
TABLE.zebra TR TD {border-bottom: 1px solid #DDD;}
|
TABLE.zebra TR TD {border-bottom: 1px solid var(--zebra-header);}
|
||||||
TABLE.zebra TR:nth-child(odd) {background: #EFEFEF;}
|
TABLE.zebra TR:nth-child(odd) {background: var(--zebra-odd);}
|
||||||
TABLE.zebra TR:nth-child(even) {background: #E0E0E0;}
|
TABLE.zebra TR:nth-child(even) {background: var(--zebra-even);}
|
||||||
|
|
||||||
FOOTER {
|
FOOTER {
|
||||||
clear: both;
|
clear: both;
|
||||||
font-size: 0.7em;
|
font-size: 0.7em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: #BBB;
|
background: var(--title);
|
||||||
border: 1px solid #AAA;
|
border: 1px solid var(--title-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
A {text-decoration: none;}
|
A {
|
||||||
A:hover {text-decoration: underline;}
|
text-decoration: none;
|
||||||
|
color: var(--link-default);
|
||||||
|
}
|
||||||
|
A:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
A:visited {
|
||||||
|
color: var(--link-visited);
|
||||||
|
}
|
||||||
|
|
||||||
UL {
|
UL {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
@ -162,19 +211,14 @@ ARTICLE TABLE {
|
||||||
.thumb {
|
.thumb {
|
||||||
width: 226px;
|
width: 226px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
zoom: 1; /* ie6 */
|
|
||||||
*display: inline; /* ie6 */
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
.thumb IMG {
|
.thumb IMG {
|
||||||
border: 1px solid #CCC;
|
border: 1px solid var(--block-border);
|
||||||
background: #DDD;
|
background: var(--block);
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
border-radius: 12px; /* standard, webkit, opera */
|
border-radius: 12px;
|
||||||
-moz-border-radius: 12px; /* mozilla haven't committed yet */
|
box-shadow: 2px 2px 6px rgba(0,0,0,0.6);
|
||||||
box-shadow: 2px 2px 6px rgba(0,0,0,0.6); /* standard, opera */
|
|
||||||
-webkit-box-shadow: 2px 2px 6px rgba(0,0,0,0.6); /* webkit haven't committed yet */
|
|
||||||
-moz-box-shadow: 2px 2px 6px rgba(0,0,0,0.6); /* mozilla haven't committed yet */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue