#Mention/Replying Gradient Highlight
1 messages · Page 1 of 1 (latest)
looks seriously great, just wondering if it's possible to always correct itself by using the default background color? (I'm greedy and my CSS list is huge)
Looks nice
wdym correct itself? in what way?
u could technically open a github repos of your own with the modified CSS
and import that?
idk how u could keep the import otherwise tbh
ty btw
This snippet seems to works for me, you just have to edit some color values to make it fit your theme
.mentioned__5126c::after {
background-image: linear-gradient(to right, #ba6d14, #393a41) !important;
}
.replying__5126c::after {
background-image: linear-gradient(to right, #3a48a3, #393a41) !important;
}
.backgroundFlash__5126c[data-flash="true"]::after {
background-image: linear-gradient(to right, #3a48a3, #393a41) !important;
}
.backgroundFlash__5126c[data-flash="false"]::after {
background-image: linear-gradient(to right, #3a48a3, #393a41) !important;
}``` (i don't know css)
It should be quite easy to make it obey your theme colors using variables
prbly, i just dont know the variable names for theme colors
betterdiscord docs but should still apply (probably)
https://docs.betterdiscord.app/themes/introduction/environment#discord-s-variables
.mentioned__5126c::after {
opacity: 1;
background-image: linear-gradient(to right, var(--background-mentioned), var(--background-base-lower));
}
.replying__5126c::after {
opacity: 1;
background-image: linear-gradient(to right, var(--background-message-highlight), var(--background-base-lower));
}
add this under the import to use the corresponding variables

Is there a way to make the gradient go from color to transparent? I think it'd be background-image: #colorhere, rgba(????); but I don't know the exact way to do it. And how to adjust how fast it fades?
This is really cool though, I love this. I hate the ping color in most themes so being able to make it exactly how I like is awesome.
I'll try changing this, if it works well, ill apply it to the GitHub
it's really easy to find them
just open devtools and go to the variable it uses for the background
also btw, this gets rid of the hover color for replied msgs
don't think I tested mentioned msgs, but probably there too
all you need is to change the 4 variables
safe to say, this works well, but the color to the left is barely visible, which is why i made it brighter in the first place
ill just change the right side's value to the variable
You should be able to do some color mixing to increase the opacity
possible, but wut's the point? if its gonna look almost the same
@autumn fable @peak wren @mystic tide i updated the github to have the right side of the gradient be able to adjust to your theme's background color
After a lot of fiddling around, I have this:background-image: linear-gradient(to right, #321414 1%, rgba(0,0,0,0) 50%, rgba(0,0,0,0)); (adjust the #321414 for your preferred initial color or variable, and the 1% and 50% for how fast you want the gradient to fade to transparent, I've got it at a very fast fade)
THANK YOU, Burning Stone, for the initial setup and dom for the customization bit to make this work!
I mean tbh the opacity is a separate tweak from the gradient
this is with 1 opacity, the default color is just not vibrant enough
but u can do it on your end, if u feel like it
how to change this line color?
this is controlled by the --info-warning-foreground variable
i dont know where this is used, so ill give you two options
possibly recolors other things:
:root {
--info-warning-foreground: #000000;
}
only recolors the line:
.mentioned__5126c:before {
background: #000000;
}
replace the #000000 with your color of choice
thank you, both of them work and it does not matter where to write them.
found something broken
(built off of this)
isn't this all you need?
(its going to-left to line things up nicely heh)
i guess so, I just ripped the selectors from the raw file quickly
(oh also idk if that message class check is needed- just felt smart to add SLIGHTLY more insurance it doesnt hit unintended elements)
wonder if you could apply this same gradient for when you hover a message
.message__5126c:hover {
background: linear-gradient(
to left,
transparent,
var(--background-message-hover)
) !important;
}
did u add anything beyond the GitHub import?
nah
probly has smth to do with the message markdown as theres also ones where it aint fricked
I'm pretty sure adding more ::after's beyond the github import can do strange things cuz it adds elements instead of editing them
correct me if I'm wrong
this prbly works, I just didn't do it cuz it was originally meant for personal use
I just posted it for fun
oh this is just for generic hovers as like an addon to the replies and mentions
like the gray hover
yeah I know wut u mean
I just didn't implement it cuz I didn't care enough, as it was for my personal use
it appears over the wallpaper and not fade completely
can I make it fade sooner or something like that?
i think u can change the right side of the gradient to be transparent
yes I want to do that but how
@glad trench i think this person did it with this
it's perfect but I'd like to use it with the normal colors of discord
if you can just send me the hex codes that'd be great
@rose dove
u want this faded default orange @glad trench ?
yeah
and dw I already got it just forgot to tell ya
gonna post it rn
/*Mention/Replying Gradient Highlight Colors*/
.mentioned__5126c::after {
opacity: 1;
background-image: linear-gradient(to right, #2a1b0b 1%, rgba(0,0,0,0) 50%, rgba(0,0,0,0));
}
.replying__5126c::after {
opacity: 1;
background-image: linear-gradient(to right, #171b37 1%, rgba(0,0,0,0) 50%, rgba(0,0,0,0));
}
/*Mention/Replying Gradient Highlight Colors*/
I think an approach like this might be a bit better, but for some reason the gradient isn't being smooth
but this'll use theme colors
:root {
--mrg-fade-color: var(--background-base-lower);
--mrg-fade-percent: 50%;
}
.message__5126c.mentioned__5126c {
background-image: linear-gradient(to right, var(--background-mentioned) var(--mrg-fade-percent, 50%), var(--mrg-fade-color, transparent)) !important;
&:hover {
background-image: linear-gradient(to right, var(--background-mentioned-hover) var(--mrg-fade-percent, 50%), var(--mrg-fade-color, transparent)) !important;
}
}
.message__5126c:is(.highlighted__5126c, .replying__5126c) {
background-image: linear-gradient(to right, var(--background-message-highlight) var(--mrg-fade-percent, 50%), var(--mrg-fade-color, transparent)) !important;
&:hover {
background-image: linear-gradient(to right, var(--brand-10a) var(--mrg-fade-percent, 50%), var(--mrg-fade-color, transparent)) !important;
}
}
i avoided the --background-mentioned type of variables on purpose cuz its not vibrant enough for my taste
u can change it on your end
well then you could use other variables instead
like the variables background-mentioned is defined by
yeah cuz your opacity is .2 ðŸ˜
@graceful apex
oh i guess
im using the midnight theme so its more visible for me
I committed a change in background flash part of the code to attempt to fix a bug where discord jumps to a random message way up high on chat updates (new messages), it causes Discord to re-render the whole thing if the animation is active
which causes the random jump
should work now, on my end it does, if it still happens i might changes again
thoughts on this absolue chaos ?
wait- already realizing that :has message was from a point where it wasnt checking for message__ lol
are u trying to make the hover gradient too?
🤔
yea ig
is this possible to make this highlight gradient too?
my import does
i fixed a bug where the background flash highlight would override the mentioned highlight
by changing the name of the actual class being used for the flash
its not backgroundFlash__5126c but its actually flash__03436
now it works thanks
👌
why is it like this when it should be like this
both message are from the same person in the same channel and I took both screenshots without changing anything at all
Does one message have a thread and the other doesn’t?
yeah
Yeah I noticed that too
is there any solution for it?
nothing in my code changes depending on thread
I have no clue why this happens to you, not even sure if it's a thing on my end too
first thing I'd check is, if u remove my import, does the default highlight still appear in offset like that
it appears like this
that's without my import, right
if so, smth else is screwing that up
I think that line of the thread is acting like a border that's what's making the issue
not sure if it's a discord thing or a custom theme thing on your end
i fixed it
found the issue
uploading to github soon
uploaded the fix now, should be fine on your end as well
it's both good and bad
also sorry for not replying earlier I wasn't at home
rn the thread thing is fixed
but it broke the opacity thing we did before
this one
remove the ::after from that code block
the 2 instances of the ::after
yes now it works great
can you add this to the gradients too?
it's the editing highlight
seems it also does this
that should already be fixed
did u add any code on top?
nah
u only have the import?
Yeah
when does it happen?
does it happen when u hover over it? or wut
nah just slight display issue
cuz it doesnt happen on my end
cant rly help u if u dont provide me some details
can u show me your QuickCSS Editor?
cuz from wut ive dealt with this issue, the problem is using the ::after in the code
ive already removed all ::after's
@import url("https://raw.githubusercontent.com/BurningStoneDiscord/DiscordHighlightGradient/refs/heads/main/MentionReplyingFancyGradient.css");
.mentioned__5126c::after {
background-image: linear-gradient(to right, #ba6d14, #393a41) !important;
}
.replying__5126c::after {
background-image: linear-gradient(to right, #3a48a3, #393a41) !important;
}
.backgroundFlash__5126c[data-flash="true"] {
background-image: linear-gradient(to right, #3a48a3, #393a41) !important;
}
.backgroundFlash__5126c[data-flash="false"] {
background-image: linear-gradient(to right, #3a48a3, #393a41) !important;
}
see
u have ::after's
i knew it wasnt just my import
u added on top of it
remove the ::after's
background-image: linear-gradient(to right, #ba6d14, #393a41) !important;
}```
it should just be like this
did so and uhh
yeah u gotta control the opacity in the color codes
i use the RGBA format for that
has an opacity variable
if ur having trouble, just remove everything past my import
i already set up some nice colors by default
whats the settings you use
aight fixed it now its back to normal
anyway to add this to the gradient thing
this appears when you jump to a message from a reply
this one too please
I applied a fix to the github because the latest discord update broke the gradient when hovering
I applied a fix for today's discord update as well that changed all the CSS class names
It seems like I cant change the colors
Any idea why changing colors when puttin the raw code without import in custom css doesnt change the colors?
u must be doing smth wrong
show me what you're trying to change
Mainly the rgb values
The orange ones
So the default discord color
the orange color i applied in the script is actually a custom one
a brighter one, cuz discord's orange is barely visible imo
u should be able to change it
again, u must be doing smth wrong
when u use the color slider, does it change the value in the code itself?
are u using both the import AND the raw code at the same time?
I tried with both I believe
ah ye that worked, but that small stripe on the side, can that be changed?
Oh found it
im pretty sure the class name for that is
._5126c0cd07f243a0-mentioned::before
should work yeah
It is 
@rose dove Do you happen to have the old version still? Discord reverted the classes again
try using this regex replace #🎨-theme-development message
that worked, thanks!
I'll update the github