Skip to content

Commit

Permalink
支持深色模式
Browse files Browse the repository at this point in the history
  • Loading branch information
zhheo committed Dec 22, 2023
1 parent 0b7cef2 commit e8ad392
Showing 1 changed file with 31 additions and 10 deletions.
41 changes: 31 additions & 10 deletions main.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
:root {
--background: #f6f7f8;
--card-bg: #fff;
--second-bg: #F7F7F7;
--font-color: #000;
}

@media (prefers-color-scheme: dark) {
:root {
--background: #1e2020;
--card-bg: #0f0f0f;
--second-bg: #303134;
--font-color: #fff;
}
}

body {
background: #f6f7f8;
background: var(--background);
margin: 0;
padding: 0;
}
Expand All @@ -18,7 +34,7 @@ body {
}

.wechat-card {
background: #fff;
background: var(--card-bg);
max-width: 428px;
max-height: 569px;
border-radius: 16px;
Expand All @@ -33,11 +49,12 @@ body {
width: 256px;
height: 256px;
display: flex;
border-radius: 12px;
}

.tips {
font-size: 14px;
color: #000;
color: var(--font-color);
opacity: 0.5;
margin-top: 8px;
}
Expand All @@ -46,7 +63,7 @@ body {
width: 100%;
display: flex;
margin-top: 16px;
background: #F7F7F7;
background: var(--second-bg);
padding: 18px;
border-radius: 16px;
align-items: center;
Expand All @@ -67,13 +84,13 @@ body {

.wechatOA-description {
font-size: 12px;
color: #000;
color: var(--font-color);
opacity: 0.5;
}

a.footer-item {
font-size: 14px;
color: #000;
color: var(--font-color);
opacity: 0.5;
text-decoration: none;
margin: 20px 0;
Expand All @@ -97,7 +114,7 @@ a.footer-item {
}

a.footer-item:visited {
color: #000;
color: var(--font-color);
}

a.footer-item:hover {
Expand All @@ -107,7 +124,7 @@ a.footer-item:hover {
}

.wechat-need-reply {
background: #fff;
background: var(--card-bg);
max-width: 328px;
max-height: 569px;
border-radius: 16px;
Expand Down Expand Up @@ -147,15 +164,19 @@ span#wechat-need-reply-text {

span.wechat-need-reply-front {
font-size: 14px;
color: #000;
color: var(--font-color);
font-weight: bold;
}

span.wechat-need-reply-back {
font-size: 14px;
color: #000;
color: var(--font-color);
}

.footer {
display: flex;
}

.wechatOA-info {
color: var(--font-color);
}

0 comments on commit e8ad392

Please sign in to comment.