XF 2.2 Match color to poster's usergroup's

Drix

Member
Hi! I'm trying to do a:

.message-name a{
text-decoration:underline;
text-decoration-color: idkwhatgoeshere ;
}

and have the underline color match the user's name color. any idea how i can grab the poster's color?
 
Solution
Why do you want the names underlined?

However, just add it as a rule to each user group:
1636588237979.png

Or just add this to the extra.less template:
Less:
.message-name a span
{
    text-decoration: underline;
}

Drix

Member
Set the colours in the user group and it will automatically show there.

View attachment 260050
that is exactly how i've assigned colors to usergroups but if i add

.message-name a{
text-decoration:underline;
}

to extra.less

i get a white underline under all usernames no matter the user's color
i guess they're getting the underline color from my link color? my links are white but i dont have any !important for their color afaik
 

Brogan

XenForo moderator
Staff member
Why do you want the names underlined?

However, just add it as a rule to each user group:
1636588237979.png

Or just add this to the extra.less template:
Less:
.message-name a span
{
    text-decoration: underline;
}
 
Solution

Drix

Member
Why do you want the names underlined?
oh it's a recent port from vbulletin and i want to create a theme that's as reminiscent of the old forum as possible to make it "cozy" and familiar for the old users and i feel like it adds some space / defines elements better when on mobile.

Or just add this to the extra.less template:

adding "span" solved it, thank you!
i have less than a week of experience since i started working with this stuff so im still getting used to the syntax, commands and whatnot. i'll probably end up reading the entire HTML category on w3schools 1 tag at a time before long
 
Top