1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Another super feature: auto dark mode!

This commit is contained in:
Cotes Chung
2020-01-03 21:22:11 +08:00
parent 1c2be0c243
commit 2386fe5bd8
13 changed files with 325 additions and 122 deletions

View File

@@ -23,7 +23,7 @@
.post-tail {
margin-top: 3.5rem;
border-bottom: 1px double #e9ecef;
border-bottom: 1px double var(--main-border, #e9ecef);
font-size: 0.85rem;
}
@@ -36,8 +36,8 @@
.post-navigation .btn.disabled {
width: 50%;
position: relative;
color: #2a408e;
border-color: #e9ecef;
color: var(--link-color, #2a408e);
border-color: var(--main-border, #e9ecef);
}
.post-navigation .btn:hover {
@@ -51,7 +51,7 @@
cursor: not-allowed;
background: none;
color: gray;
border-color: #e9ecef;
border-color: var(--main-border, #e9ecef);
}
.post-navigation a.btn.btn-outline-primary.disabled:focus {
@@ -138,8 +138,9 @@
}
#related-posts .card {
border: 1px solid #f1f1f1;
box-shadow: 0 0 5px 0 rgba(234, 234, 234, 0.7686274509803922);
border: 1px solid var(--main-wrapper-bg, #f1f1f1);
background-color: var(--card-bg);
box-shadow: 0 0 5px 0 var(--main-wrapper-bg, rgba(234, 234, 234, 0.7686274509803922));
-webkit-transition: all .3s ease-in-out;;
-moz-transition: all .3s ease-in-out;;
transition: all .3s ease-in-out;
@@ -152,7 +153,7 @@
}
#related-posts .card h3 {
color: #353a3d;
color: var(--relate-post-title, #353a3d);
}
#related-posts .timeago {
@@ -194,7 +195,6 @@
min-height: 2rem;
}
@media all and (max-width: 768px) {
.post img {
max-width: calc(100% + 1rem);
@@ -266,3 +266,15 @@
margin-right: calc((100% - 1150px) / 8 + 300px);
}
}
@media (prefers-color-scheme: dark) {
nav[data-toggle=toc] .nav-link.active,
nav[data-toggle=toc] .nav-link.active:focus,
nav[data-toggle=toc] .nav-link.active:hover,
nav[data-toggle=toc] .nav>li>a:focus,
nav[data-toggle=toc] .nav>li>a:hover {
/* Override BS */
color: var(--toc-highlight)!important;
border-left-color: var(--toc-highlight)!important;
}
}