WildcardSearch / MentionMe

A plugin for MyBB 1.8.x that allows Twitter-style tagging and integration with MyAlerts
GNU General Public License v3.0
21 stars 9 forks source link

CSS styling issue in text editor #238

Closed Eldenroot closed 5 years ago

Eldenroot commented 5 years ago

There is a small issue, I am not sure if it is intended.

When you mention someone in your post and select the mentioned username -> click on "B" icon in editor to make text bolded, the mentioned username does not follow display setting set in ACP usegroups.

This can be solved by adding CSS font-weight: normal !important; (however this is not the best solution for admins who use bold style for usergroups).

I think mentioned usernames should not be affected by text editor styles. What do you think @WildcardSearch

WildcardSearch commented 5 years ago

I'll have to do some testing (if I ever get any time).

The issue here is the way that MyBB styles the post contents. Nested elements should generally be affect by parent styling, but in this case, it isn't the best option. I never noticed the font-weight glitch, but I have noticed that text size parameters affect mentions. Because mentions receive their style from MyBB usergroup info, there isn't much I can do (that I know of) to "lock" the style from being affected by parent elements.

I'd love it if any of the CSS wizards out there could help with this. Thanks for starting a discussion, @Eldenroot!

Eldenroot commented 5 years ago

It is quite tricky, not easy to fix :( I am not sure how DVZ mentions handles this, can you test?

WildcardSearch commented 5 years ago

DVZ Mentions 1.05 w/applied formatting:

DVZ Mentions 1.05 w/applied formatting

The more I think about it, I don't feel that this is an issue. First of all, it is avoidable: if the user doesn't wish for the mention to look differently, they are free to wrap it in its own size/format tags; and secondly, maybe it is desirable in some instances to have a large or different colored mention?