Jump to content

group color on mention


kRSB

Recommended Posts

I know i can change the color of a mention with this css code:

a[data-mentionid] {
    color: #color
}

But how can I do it dynamically so it shows the group color of the member? I tried looking in the templates and found "mentionRow" which I thought was the place to edit it, but apparently that's something else.

Link to comment
Share on other sites

@kRSB, @Mark

@kRSB, @Mark

Okay, Ignore my mentions in this reply. Something went completely awry in the text editor, I was unable to delete it or write any more text in the editor without publishing it to empty the editor. Still can't remove them.

EDITED: I take the below statement back, it doesn't work actually. The information about the group ID of the mention is not provided in the HTML.

To answer your question, I didn't think it was actually possible with only CSS, but it actually is: 

a[data-mentionid][id$='_3'] {
	background: pink;   
}

Produces: 

Skjermbilde 2016-08-02 kl. 07.57.11.png

Where 3 refers to the group ID. You need the underscore in front on the number.

Link to comment
Share on other sites

9 hours ago, TSP said:

@kRSB, @Mark

@kRSB, @Mark

Okay, Ignore my mentions in this reply. Something went completely awry in the text editor, I was unable to delete it or write any more text in the editor without publishing it to empty the editor. Still can't remove them.

EDITED: I take the below statement back, it doesn't work actually. The information about the group ID of the mention is not provided in the HTML.

To answer your question, I didn't think it was actually possible with only CSS, but it actually is: 


a[data-mentionid][id$='_3'] {
	background: pink;   
}

Produces: 

Skjermbilde 2016-08-02 kl. 07.57.11.png

Where 3 refers to the group ID. You need the underscore in front on the number.

Oh would have been nice if it worked that way, but how did you manage to get it pink and blue then? :p

Also do you have any idea where the html template is located for mentions?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...