aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorBenjamin Linskey2026-06-02 20:09:30 -0400
committerBenjamin Linskey2026-06-07 16:59:07 -0400
commit95dbec6b23c458b73f51e30ccf7887bbc9b72521 (patch)
treebd142dfefb8c5a7a971e1ba27fa1874c0266e505
parentd515fe0945d8ae921b56a24d961406cb2976c813 (diff)
downloadcgit-95dbec6b23c458b73f51e30ccf7887bbc9b72521.tar.gz

css: Fix code block background in light mode

btl/main
-rw-r--r--cgit.css6
1 files changed, 5 insertions, 1 deletions
diff --git a/cgit.css b/cgit.css
index 6ee0781..8d9d040 100644
--- a/cgit.css
+++ b/cgit.css
@@ -911,6 +911,8 @@ div#cgit table.ssdiff td.space div {
/***** Start of fork additions *****/
:root {
+ color-scheme: light dark;
+
--td-padding-y: 0.3em;
--th-padding-y: calc(2 * var(--td-padding-y));
@@ -948,6 +950,8 @@ div#cgit table.ssdiff td.space div {
--dk-light-teal: #7ee5c3; /* Hue: 160 */
--dk-light-blue: #7ebae5; /* Hue: 205 */
--dk-light-purple: #7e86e5; /* Hue: 235 */
+
+ --lt-gray: #eee;
}
div#cgit {
@@ -991,7 +995,7 @@ div#summary img {
div#summary pre {
overflow: auto;
padding: 1rem;
- background-color: var(--dk-light-black);
+ background-color: light-dark(var(--lt-gray), var(--dk-light-black));
}
@media(prefers-color-scheme: dark) {