From 01e57fd57d40cfbe0e7f9138c3662ed0371de10a Mon Sep 17 00:00:00 2001 From: Farhad Jay Date: Sat, 2 Nov 2024 01:02:57 -0700 Subject: [PATCH 1/2] Apply tagged visibility pref as other prefs Define a separate ruleset for the the preference to apply its specific rules. --- assets/chat/css/messages/modifiers/_highlight.scss | 6 +++--- assets/chat/css/messages/modifiers/_tagged.scss | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/chat/css/messages/modifiers/_highlight.scss b/assets/chat/css/messages/modifiers/_highlight.scss index 0e4430ac..99dfae38 100644 --- a/assets/chat/css/messages/modifiers/_highlight.scss +++ b/assets/chat/css/messages/modifiers/_highlight.scss @@ -8,8 +8,8 @@ .continue { color: a.$color-chat-text3; } +} - .pref-taggedvisibility & { - background-color: a.$color-chat-highlight; - } +.pref-taggedvisibility .msg-tagged { + background-color: a.$color-chat-highlight; } diff --git a/assets/chat/css/messages/modifiers/_tagged.scss b/assets/chat/css/messages/modifiers/_tagged.scss index 7b17d23b..b1c22098 100644 --- a/assets/chat/css/messages/modifiers/_tagged.scss +++ b/assets/chat/css/messages/modifiers/_tagged.scss @@ -27,13 +27,13 @@ $tag-colors: ( content: ''; } - .pref-taggedvisibility & { - background-color: a.$color-chat-tagged; - } - @each $name, $color in $tag-colors { &.msg-tagged-#{$name}:before { background-color: $color; } } } + +.pref-taggedvisibility .msg-tagged { + background-color: a.$color-chat-tagged; +} From a2396c200895f20e71be1f3b70a08e478afcf0dc Mon Sep 17 00:00:00 2001 From: Farhad Jay Date: Sat, 2 Nov 2024 01:06:00 -0700 Subject: [PATCH 2/2] Fix increased visibility overriding highlighting When User A mentions User B and User B tagged User A with a color, User A's message should be highlighted, even if User B has "increased visibility of tagged users" enabled. --- assets/chat/css/messages/modifiers/_highlight.scss | 4 ---- assets/chat/css/messages/modifiers/_tagged.scss | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/assets/chat/css/messages/modifiers/_highlight.scss b/assets/chat/css/messages/modifiers/_highlight.scss index 99dfae38..fe814467 100644 --- a/assets/chat/css/messages/modifiers/_highlight.scss +++ b/assets/chat/css/messages/modifiers/_highlight.scss @@ -9,7 +9,3 @@ color: a.$color-chat-text3; } } - -.pref-taggedvisibility .msg-tagged { - background-color: a.$color-chat-highlight; -} diff --git a/assets/chat/css/messages/modifiers/_tagged.scss b/assets/chat/css/messages/modifiers/_tagged.scss index b1c22098..290bf3b7 100644 --- a/assets/chat/css/messages/modifiers/_tagged.scss +++ b/assets/chat/css/messages/modifiers/_tagged.scss @@ -34,6 +34,7 @@ $tag-colors: ( } } -.pref-taggedvisibility .msg-tagged { +// Prioritize highlighted message background color +.pref-taggedvisibility .msg-tagged:not(.msg-highlight) { background-color: a.$color-chat-tagged; }