summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-23 23:25:29 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-23 23:25:29 +0200
commitbffd891e24b67b9536734a299a2c26e529e942c0 (patch)
treef46289b310040051c86a08e2b3d6e872afd6ea7c
parent53d57ecc230ac9941a6e5b592b8b0371403a522f (diff)
Make shadow rules toggle override aware
-rw-r--r--public/stylesheets/ccc.css39
1 files changed, 22 insertions, 17 deletions
diff --git a/public/stylesheets/ccc.css b/public/stylesheets/ccc.css
index 295250fb..b2160e66 100644
--- a/public/stylesheets/ccc.css
+++ b/public/stylesheets/ccc.css
@@ -41,6 +41,12 @@
41 --toggle-left: 816px; /* provenance unknown; 140px right of 41 --toggle-left: 816px; /* provenance unknown; 140px right of
42 --search-left */ 42 --search-left */
43 --burger-right: 54px; /* provenance unknown */ 43 --burger-right: 54px; /* provenance unknown */
44
45 /* Paper treatment (document thumbs and cards). Light-mode defaults;
46 the effective-dark overrides live with the scheme logic in
47 section 3 -- the one place toggle-awareness is implemented. */
48 --paper-edge: rgba(128, 128, 128, 0.4);
49 --paper-shadow: 2px 3px 8px rgba(0, 0, 0, 0.25);
44} 50}
45 51
46/* ========================================================================== 52/* ==========================================================================
@@ -114,12 +120,16 @@ dd {
114 inline restore script in the layout that re-checks #light-mode before 120 inline restore script in the layout that re-checks #light-mode before
115 first paint (the JS contract: checkbox id "light-mode", state persisted 121 first paint (the JS contract: checkbox id "light-mode", state persisted
116 by the script). Symmetric blocks: each scheme inverts when the toggle 122 by the script). Symmetric blocks: each scheme inverts when the toggle
117 is checked. 123 is checked. Also owns the --paper-* effective-dark overrides (defaults
124 in section 1).
118 ========================================================================== */ 125 ========================================================================== */
119 126
120@media (prefers-color-scheme: light) { 127@media (prefers-color-scheme: light) {
121 body:has(#light-mode:checked) { 128 body:has(#light-mode:checked) {
122 color-scheme: dark; 129 color-scheme: dark;
130 --paper-edge: rgba(200, 200, 200, 0.35);
131 --paper-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06),
132 4px 6px 16px rgba(0, 0, 0, 0.8);
123 } 133 }
124 #light-mode + label[for=light-mode]:before { content: '🌙'; } 134 #light-mode + label[for=light-mode]:before { content: '🌙'; }
125 #light-mode:checked + label[for=light-mode]:before { content: '☀️'; } 135 #light-mode:checked + label[for=light-mode]:before { content: '☀️'; }
@@ -137,6 +147,11 @@ dd {
137 body:has(#light-mode:checked) { 147 body:has(#light-mode:checked) {
138 color-scheme: light; 148 color-scheme: light;
139 } 149 }
150 body:not(:has(#light-mode:checked)) {
151 --paper-edge: rgba(200, 200, 200, 0.35);
152 --paper-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06),
153 4px 6px 16px rgba(0, 0, 0, 0.8);
154 }
140 #light-mode + label[for=light-mode]:before { content: '☀️'; } 155 #light-mode + label[for=light-mode]:before { content: '☀️'; }
141 #light-mode:checked + label[for=light-mode]:before { content: '🌙'; } 156 #light-mode:checked + label[for=light-mode]:before { content: '🌙'; }
142 157
@@ -579,7 +594,7 @@ div#open_erfas_today .event_time {
579 594
580 div#frontpage_calendar h2 { 595 div#frontpage_calendar h2 {
581 display: block; 596 display: block;
582 border-top: 2px solid #aeadad; 597 border-top: 1px solid color-mix(in srgb, CanvasText, Canvas 60%);
583 padding: 2px 0; 598 padding: 2px 0;
584 } 599 }
585 600
@@ -733,8 +748,6 @@ div.author_and_date {
733 748
734.article_partial_layout { 749.article_partial_layout {
735 display: flow-root; 750 display: flow-root;
736 gap: 12px;
737 align-items: flex-start;
738} 751}
739 752
740.article_thumbnail { 753.article_thumbnail {
@@ -751,8 +764,8 @@ div.author_and_date {
751 display: block; 764 display: block;
752 765
753 border-radius: 4px; 766 border-radius: 4px;
754 border: 1px solid rgba(128, 128, 128, 0.4); 767 border: 1px solid var(--paper-edge);
755 box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.25); 768 box-shadow: var(--paper-shadow);
756} 769}
757 770
758.article_partial_layout .excerpt { 771.article_partial_layout .excerpt {
@@ -788,7 +801,7 @@ div.author_and_date {
788} 801}
789 802
790#asset_credits { 803#asset_credits {
791 border-top: dotted 1px silver; 804 border-top: dotted 1px color-mix(in srgb, CanvasText, Canvas 60%);
792} 805}
793 806
794#asset_credits, 807#asset_credits,
@@ -817,20 +830,12 @@ div.author_and_date {
817} 830}
818 831
819.headline_document_card_thumb { 832.headline_document_card_thumb {
820 border: 1px solid rgba(128, 128, 128, 0.4); 833 border: 1px solid var(--paper-edge);
821 box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.25); 834 box-shadow: var(--paper-shadow);
822 max-width: 180px; 835 max-width: 180px;
823 height: auto; 836 height: auto;
824} 837}
825 838
826@media (prefers-color-scheme: dark) {
827 .headline_document_card_thumb {
828 border-color: rgba(200, 200, 200, 0.35);
829 box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06),
830 4px 6px 16px rgba(0, 0, 0, 0.8);
831 }
832}
833
834.headline_document_card_info { 839.headline_document_card_info {
835 display: flex; 840 display: flex;
836 flex-direction: column; 841 flex-direction: column;