From f73f73ae86c245501e264be35aedeb24106693df Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 1 May 2024 16:21:51 -0400 Subject: [PATCH] proper modified coloring in light/dark --- tdx-enhanced.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tdx-enhanced.js b/tdx-enhanced.js index 5456d54..037f2e0 100644 --- a/tdx-enhanced.js +++ b/tdx-enhanced.js @@ -220,7 +220,7 @@ let cell = modDate.cell cell.style.background = `rgba(255,0,0,${alpha}` - //cell.style.color = alpha > 0.7 ? "#000" : "#fff" + cell.classList.add(alpha > 0.5 ? "light" : "dark") } //find user replies & last modified by internal @@ -314,6 +314,7 @@ /* Root Styles */ :root { + --light-txt-1: #000; --light-col-1: #897043; --light-col-2: #635130; --light-bg-2: #ddd; @@ -362,6 +363,10 @@ --col-modified: #ffe8d1; } + .light { + color: var(--dark-txt-1) !important; + } + /* Colors */ a, a.noHover, .blue { color: var(--light-col-1) !important; @@ -419,6 +424,10 @@ background: var(--dark-bg-3); } + .dark { + color: var(--dark-txt-1) !important; + } + /* Body */ html, body { background-color: var(--dark-bg-0) !important;