Skip to content

Commit b2e10e3

Browse files
committed
Dark mode color optimization.
1 parent ae4adea commit b2e10e3

4 files changed

Lines changed: 18 additions & 18 deletions

File tree

assets/css/_dark/dark-main.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@
2020

2121
/* sidebar */
2222
--nav-cursor: rgb(183, 182, 182);
23-
--sidebar-bg: radial-gradient(circle, #231c4c 0%, #1d1f27 100%);
23+
--sidebar-bg: radial-gradient(circle, #242424 0%, #1d1f27 100%);
2424

2525
/* common color */
2626
--text-color: rgb(175, 176, 177);
27+
--text-muted-color: rgb(107, 116, 124);
2728
--link-color: rgb(138, 180, 248);
29+
--link-underline-color: rgb(99, 131, 182);
2830
--main-border: rgb(63, 65, 68);
2931
--button-bg: rgb(39, 40, 33);
3032
--blockquote-border: rgb(93, 95, 82);
@@ -34,6 +36,10 @@
3436
--card-header-bg: rgb(51, 50, 50);
3537
--relate-post-title: rgb(164, 175, 181);
3638

39+
/* Home page */
40+
--btn-active-bg: #1c345e;
41+
--btn-active-border-color: #8ab4f8;
42+
3743
/* posts */
3844
--toc-highlight: rgb(116, 178, 243);
3945
--tag-bg: rgb(41, 40, 40);

assets/css/home.scss

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
}
5656

5757
.page-item .page-link {
58-
color: #555555;
58+
color: var(--text-color, #555555);
5959
width: 2.5rem;
6060
height: 2.5rem;
6161
padding: 0;
@@ -73,7 +73,8 @@
7373
}
7474

7575
.page-item.active .page-link {
76-
background-color: #2a408e;
76+
background-color: var(--btn-active-bg, #2a408e);
77+
border-color: var(--btn-active-border-color, #007bff);
7778
box-shadow: 0 0 8px 0 var(--main-wrapper-bg, #4b92d2) !important;
7879
color: var(--text-color, #f8f8f8);
7980
}
@@ -131,11 +132,4 @@
131132
#post-list {
132133
padding-right: 0;
133134
}
134-
}
135-
136-
@media (prefers-color-scheme: dark) {
137-
.page-item.active .page-link {
138-
background-color: #203a96;
139-
border-color: #0252a9;
140-
}
141135
}

assets/css/main.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ html {
2323

2424
body {
2525
line-height: 1.75rem;
26-
background: #fafafa;
26+
background: var(--main-wrapper-bg, #fafafa);
2727
color: var(--text-color, #212529);
2828
-webkit-font-smoothing: antialiased;
2929
font-family: 'Source Sans Pro', 'Microsoft Yahei', sans-serif;
@@ -291,7 +291,7 @@ body {
291291
}
292292

293293
#search-wrapper+a { /* 'Cancel' link */
294-
color: #2a408e;
294+
color: var(--link-color, #2a408e);
295295
margin-left: 1rem;
296296
display: none;
297297
}
@@ -553,7 +553,7 @@ footer .license a {
553553
cursor: pointer;
554554
position: fixed;
555555
background: var(--button-bg, #fff);
556-
color: #686868;
556+
color: var(--text-color, #686868);
557557
height: 2.6em;
558558
width: 2.7em;
559559
border-radius: 50%;
@@ -662,7 +662,7 @@ a.reversefootnote {
662662

663663
.post-content a {
664664
color: var(--link-color, #2a408e);
665-
border-bottom: 1px dotted var(--link-color, #c2c6cc);
665+
border-bottom: 1px dotted var(--link-underline-color, #c2c6cc);
666666
}
667667

668668
p>a, span>a,
@@ -749,7 +749,7 @@ table tbody td {
749749

750750
.post-meta a {
751751
color: var(--link-color, #2a408e);
752-
border-bottom: 1px dotted var(--link-color, #c2c6cc);
752+
border-bottom: 1px dotted var(--link-underline-color, #c2c6cc);
753753
}
754754

755755
.post-meta a:not(:last-child) {
@@ -821,7 +821,7 @@ table tbody td {
821821
}
822822

823823
.btn-box-shadow {
824-
box-shadow: 0 0 8px 0 var(--button-bg, #eaeaea) !important;
824+
box-shadow: 0 0 8px 0 var(--main-wrapper-bg, #eaeaea) !important;
825825
}
826826

827827
.topbar-up {

assets/css/post.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
}
8080

8181
.post-navigation a::before {
82-
color: gray;
82+
color: var(--text-muted-color, gray);
8383
font-size: .65rem;
8484
text-transform: uppercase;
8585
}
@@ -157,7 +157,7 @@
157157
}
158158

159159
#related-posts .timeago {
160-
color: rgba(30,55,70,.4);
160+
color: var(--text-muted-color, rgba(30,55,70,.4));
161161
}
162162

163163
#related-posts p {

0 commit comments

Comments
 (0)