Garani

Customer
Hi all,
I am kinda puzzled. I have an issue with the style linked to the warning system. HTML correctly references to:
HTML:
<div data-template-name="public:post_macros::post_notices" class="messageNotice messageNotice--warning">

But both Brave and Edge (browser) do not respect the information given by the warning class. They both stop at ".message-cell .messageNotice". Any idea what is actually going on?

1754516953571.png
 
Solution
XenForo doesn't actually change the colors on message notices. The only thing they change on each notices are the icons. What you're seeing here is the default CSS (.messageNotice) but we overwrite it using our custom CSS (.message-cell .messageNotice) to make them work a little more universal.
You can add in your own CSS to target the warning notice if you want to change the colors. There are multiple types:
.messageNotice--deleted
.messageNotice--moderated
.messageNotice--warning
.messageNotice--ignored


Some CSS to go inside extra.less might look like this for the warning notice:

Code:
.message-cell .messageNotice.messageNotice--warning
{
    background: @xf-warningBg;
    color: @xf-warningColor;
    border-color...
XenForo doesn't actually change the colors on message notices. The only thing they change on each notices are the icons. What you're seeing here is the default CSS (.messageNotice) but we overwrite it using our custom CSS (.message-cell .messageNotice) to make them work a little more universal.
You can add in your own CSS to target the warning notice if you want to change the colors. There are multiple types:
.messageNotice--deleted
.messageNotice--moderated
.messageNotice--warning
.messageNotice--ignored


Some CSS to go inside extra.less might look like this for the warning notice:

Code:
.message-cell .messageNotice.messageNotice--warning
{
    background: @xf-warningBg;
    color: @xf-warningColor;
    border-color: @xf-warningFeatureColor;
    a { color: @xf-warningFeatureColor; }
    &:before { background-color: @xf-warningFeatureColor; }
}
 
Solution

Pre-Sale Questions

If you have any questions or concerns you want to ask before you make a purchase don't hesitate to use one of our multiple support channels for your convenience.

Back