mirror of
https://github.com/flarum/core.git
synced 2025-07-25 18:51:40 +02:00
fix: groupmentions have poor contrast on some backgrounds (#3672)
* fix: poor text contrast on some backgrounds * use hexdec() * fix render test * appears to be working now
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import app from 'flarum/forum/app';
|
||||
import username from 'flarum/common/helpers/username';
|
||||
import extractText from 'flarum/common/utils/extractText';
|
||||
import isDark from 'flarum/common/utils/isDark';
|
||||
|
||||
export function filterUserMentions(tag) {
|
||||
let user;
|
||||
@@ -40,6 +41,7 @@ export function filterGroupMentions(tag) {
|
||||
tag.setAttribute('groupname', extractText(group.namePlural()));
|
||||
tag.setAttribute('icon', group.icon());
|
||||
tag.setAttribute('color', group.color());
|
||||
tag.setAttribute('class', isDark(group.color()) ? 'GroupMention--light' : 'GroupMention--dark');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user