mirror of
https://github.com/oupala/apaxy.git
synced 2025-08-08 15:06:42 +02:00
feat(theme): add a proper dark mode (and globally improve CSS styles)
This patch globally improves Apaxy CSS theme, and adds a dark mode (media query: `prefers-color-scheme`). It also fixes some indentation issues the style-sheet was reading. Co-authored-by: NAERNON <naernon@icloud.com>
This commit is contained in:
@@ -19,14 +19,18 @@ button,hr,input{overflow:visible}audio,canvas,progress,video{display:inline-bloc
|
|||||||
|
|
||||||
html {
|
html {
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
border-top: 10px solid #ECEEF1;
|
|
||||||
border-bottom: 10px solid #ECEEF1;
|
|
||||||
color: #61666c;
|
color: #61666c;
|
||||||
|
background-color: #fff;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
font-family: sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||||
line-height: 2em;
|
line-height: 2em;
|
||||||
}
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
html {
|
||||||
|
background-color: #232323;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
@@ -38,17 +42,31 @@ code {
|
|||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #61666c;
|
color: #000;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
a {
|
||||||
|
color: #e9e9e9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
a, img {
|
a, img {
|
||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a > img:hover {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
color: #2a2a2a;
|
color: #bababa;
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
a:hover {
|
||||||
|
color: #696969;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*------------------------------------*\
|
/*------------------------------------*\
|
||||||
@@ -65,18 +83,27 @@ a:hover {
|
|||||||
Filter (search box)
|
Filter (search box)
|
||||||
\*------------------------------------*/
|
\*------------------------------------*/
|
||||||
#filter {
|
#filter {
|
||||||
|
background-color: rgba(0, 0, 0, 0.04);
|
||||||
float: right;
|
float: right;
|
||||||
font-size:.75em;
|
font-size:.75em;
|
||||||
padding: .5em;
|
padding: .5em;
|
||||||
margin-bottom: .5em;
|
margin-bottom: .5em;
|
||||||
border: 1px solid #aaa;
|
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||||
border-radius: .25em;
|
border-radius: .25em;
|
||||||
width: 10em;
|
width: 10em;
|
||||||
transition: width 0.25s ease;
|
transition: width 0.25s ease;
|
||||||
}
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
#filter {
|
||||||
|
background-color: rgba(255, 255, 255, 0.07);
|
||||||
|
border-color: rgba(255, 255, 255, 0.15);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
#filter:focus {
|
#filter:focus {
|
||||||
width: 14em;
|
width: 14em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*------------------------------------*\
|
/*------------------------------------*\
|
||||||
Demo block
|
Demo block
|
||||||
\*------------------------------------*/
|
\*------------------------------------*/
|
||||||
@@ -96,6 +123,21 @@ table {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
font-size: .875em;
|
font-size: .875em;
|
||||||
|
color: rgb(143, 143, 143);
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
table {
|
||||||
|
color: rgb(111, 111, 111);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.odd {
|
||||||
|
background-color: rgb(244, 244, 244);
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.odd {
|
||||||
|
background-color: rgb(50, 50, 50);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tr {
|
tr {
|
||||||
@@ -103,10 +145,6 @@ tr {
|
|||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr:hover td {
|
|
||||||
background: #f6f6f6;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
th {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: .75em;
|
font-size: .75em;
|
||||||
@@ -137,7 +175,6 @@ td {
|
|||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-bottom: 1px solid #edf1f5;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
transition: background 300ms ease;
|
transition: background 300ms ease;
|
||||||
@@ -146,6 +183,11 @@ td {
|
|||||||
-moz-transition: background 300ms ease;
|
-moz-transition: background 300ms ease;
|
||||||
-webkit-transition: background 300ms ease;
|
-webkit-transition: background 300ms ease;
|
||||||
}
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
td {
|
||||||
|
border-color: #424242;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
td a {
|
td a {
|
||||||
display: block;
|
display: block;
|
||||||
@@ -260,16 +302,24 @@ tr.parent a[href^="/"] {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb li {
|
.breadcrumb li {
|
||||||
|
color: rgb(154, 154, 154);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
line-height: 26px;
|
line-height: 10px;
|
||||||
margin: 0 9px 0 -10px;
|
margin: 0 9px 20px -10px;
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.breadcrumb li {
|
||||||
|
color: rgb(100, 100, 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.breadcrumb li::before,
|
.breadcrumb li::before,
|
||||||
.breadcrumb li::after {
|
.breadcrumb li::after {
|
||||||
border-right: 1px solid #666666;
|
border-right: 1.5px solid #000;
|
||||||
content: '';
|
content: '';
|
||||||
display: block;
|
display: block;
|
||||||
height: 50%;
|
height: 50%;
|
||||||
@@ -280,6 +330,13 @@ tr.parent a[href^="/"] {
|
|||||||
z-index: -1;
|
z-index: -1;
|
||||||
transform: skewX(45deg);
|
transform: skewX(45deg);
|
||||||
}
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.breadcrumb li::before,
|
||||||
|
.breadcrumb li::after {
|
||||||
|
border-color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.breadcrumb li::after {
|
.breadcrumb li::after {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
top: auto;
|
top: auto;
|
||||||
@@ -295,8 +352,3 @@ tr.parent a[href^="/"] {
|
|||||||
letter-spacing: -1px;
|
letter-spacing: -1px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb li:nth-of-type(1) a { color: hsl(0, 0%, 70%); }
|
|
||||||
.breadcrumb li:nth-of-type(2) a { color: hsl(0, 0%, 65%); }
|
|
||||||
.breadcrumb li:nth-of-type(3) a { color: hsl(0, 0%, 50%); }
|
|
||||||
.breadcrumb li:nth-of-type(4) a { color: hsl(0, 0%, 45%); }
|
|
||||||
|
Reference in New Issue
Block a user