Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support dark mode #612

Open
wants to merge 5 commits into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions dark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* 深色模式下的样式 */
@media (prefers-color-scheme: dark) {
img.invert-on-dark-mode {
filter: invert(1);
}

h4 {
color: #BBEFFC;
}

#langSwitch button {
background: #627262 none repeat scroll 0% 0%;
border: 1px solid #CCC;
border-radius: 5px;
}

#langSwitch button:lang(zh-hans) {
background-color: #005a9c;
}

#langSwitch button:lang(zh-hant) {
background-color: #0171c4;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two colours are too close to each other. The different colours here are to allow people who do not understand Chinese to better distinguish Traditional and Simplified Chinese.

In addition, we need to update

clreq/local.css

Lines 183 to 188 in 7d51569

.is-multilingual [its-locale-filter-list="zh-hant"] {
border-color: rgba(64,196,64,.5);
}
.is-multilingual [its-locale-filter-list="zh-hans"] {
border-color: rgba(248,138,5,.5);
}
to make them consistent.


.translateme, .retranslateme {
background-color: #627262;

}

.checkme {
background-color: #627262;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I would prefer a darker background, but not strong enough to object this.

}
}
Loading