From cc708ea36d3983336c0ebaed6eba33c28d37e24f Mon Sep 17 00:00:00 2001 From: Graham Sutherland Date: Sat, 27 Jan 2024 23:54:07 +0000 Subject: Improve chat colours Increase contrast in dark theme and add a subtle background to messages sent by the local user. --- src/web/src/components/Chat/Chat.css | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/web') diff --git a/src/web/src/components/Chat/Chat.css b/src/web/src/components/Chat/Chat.css index 107c6474..92aea58c 100644 --- a/src/web/src/components/Chat/Chat.css +++ b/src/web/src/components/Chat/Chat.css @@ -1,3 +1,13 @@ +:root { + --slskd-chat-color: #0e6eb8; + --slskd-self-message-background-color: rgba(0, 0, 0, 0.03); +} + +:root.dark { + --slskd-chat-color: #cce2ff; + --slskd-self-message-background-color: rgba(255, 255, 255, 0.03); +} + .chat { display: flex; margin-top: 1rem; @@ -76,14 +86,15 @@ .chat-message-time { float:right; - opacity: .5; + opacity: .65; font-size: smaller; font-variant: small-caps; font-style: italic; } .chat-message-self { - color: blue; + color: var(--slskd-chat-color); + background-color: var(--slskd-self-message-background-color); } .chat-input { -- cgit v1.2.3