From d480e5ce5afaf6ac39627f1d3950f008a6303af7 Mon Sep 17 00:00:00 2001 From: Matthias Metelka <62722460+kleinerpirat@users.noreply.github.com> Date: Tue, 16 Aug 2022 22:39:39 +0200 Subject: [PATCH] Experiment with CSS filter for inline-colors Inside darker inputs, some colors like dark blue will be hard to read, so we could try to improve text-color contrast with global adjustments depending on the theme. --- ts/editable/editable-base.scss | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ts/editable/editable-base.scss b/ts/editable/editable-base.scss index ac31a51ea..0e5a349fd 100644 --- a/ts/editable/editable-base.scss +++ b/ts/editable/editable-base.scss @@ -18,6 +18,15 @@ p { display: none; } +/* Nudge users towards using brighter colors, + so they are more readable in dark themes */ +span[style*="color"] { + filter: brightness(0.8); +} + :host(.night-mode) { @include scrollbar.night-mode; + span[style*="color"] { + filter: brightness(1.2); + } }