Aurorastation / Aurora.3

The code for Aurorastation's new base, forked from Baystation12.
http://aurorastation.org/
GNU Affero General Public License v3.0
139 stars 506 forks source link

Allows custom background color highlights in chat #19561

Open AlaunusLux opened 1 week ago

AlaunusLux commented 1 week ago

I disliked the background highlight color always being yellow, so I did this as an experiment to see what it would look like if we could change it, and I like it, so hopefully others will too.

This could have been implemented more cleanly if CSS vars worked in Dream Seeker's/IE's rendering engine, but since they don't, I had to change the highlight structure - it's now an appended span instead of an :after pseudo-element, since JavaScript can't modify pesudo-elements.

Inputs will be blank for existing settings, but will default to yellow highlighting. Attempts to set this variable at run-time led to unintended consequences, and I'd rather users have to set a color than have code that becomes obsolete after the first load. I'm always open to ideas, of course. New highlight settings added via the button will have their default values set, like the existing input for the word highlight.

Example image. Note that in the case of multiple highlight rules being hit for one message, the left border color will be the color of the rule that comes later in the text highlights list, and the background will be a combination of all triggered highlight colors.

image

AlaunusLux commented 1 week ago

!review

AlaunusLux commented 1 week ago

previous commit should read fixes issue with left tab color **if** background input was null