From 37192e8af3799290a2fefac9c4a8cfe620b1bb53 Mon Sep 17 00:00:00 2001 From: Karl Stolley Date: Thu, 8 Jun 2023 09:25:14 -0500 Subject: [PATCH] css: Explicitly set text-message color. This commit darkens the text-message color in the light theme to the HSL equivalent of a dark gray (#262626). This is the first time in the Zulip codebase where one CSS custom property is set to another: the dark theme preserves its use of `--color-text-default` in this way, but can be adjusted independently of the reset of the theme in the future by setting a different color value on `--color-text-message-default`. Related reading on this technique: https://css-tricks.com/a-complete-guide-to-custom-properties/#aa-properties-as-properties Fixes a part of #22022. --- web/styles/zulip.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/styles/zulip.css b/web/styles/zulip.css index 6b2f42a616..bf64a2cd47 100644 --- a/web/styles/zulip.css +++ b/web/styles/zulip.css @@ -147,7 +147,7 @@ body { /* Text colors */ --color-text-default: hsl(0deg 0% 20%); - --color-default-text: hsl(0deg 0% 15%); + --color-text-message-default: hsl(0deg 0% 15%); --color-text-message-view-header: hsl(0deg 0% 20% / 100%); --color-text-message-header: hsl(0deg 0% 15%); --color-text-dropdown-input: hsl(0deg 0% 13.33%); @@ -186,6 +186,9 @@ body { /* Text colors */ --color-text-default: hsl(0deg 0% 100% / 75%); + /* Unlike the light theme, the dark theme renders message + text in the default color. */ + --color-text-message-default: var(--color-text-default); --color-text-message-view-header: hsl(0deg 0% 100% / 80%); --color-text-message-header: hsl(0deg 0% 100% / 80%); --color-text-sender-name: hsl(0deg 0% 100% / 85%); @@ -1768,6 +1771,7 @@ div.focused_table { } .message_content { + color: var(--color-text-message-default); line-height: 1.214; min-height: 17px; display: block;