Partial fix [Microsoft Edge] Admin menu links get white background when hovered

refael

Well-known member
Was testing the microsoft Edge browser and noticed that some menu links get a white background when hovered.
Untitled.webp

After isolating the issue, I found that it's related to visited links, and specifically this part of the css
HTML:
.sideNavLinks a:link:hover,
.sideNavLinks a:visited:hover
{
    background-color: #176093;
    color: #d7edfc;
    text-decoration: none;
}

If you'll look at the Console you'll see this warning
HTML:
SEC7115: :visited and :link styles can only differ by color. Some styles were not applied to :visited.
 
This is actually an issue that, in theory, should be reproducible in many versions of IE prior to Edge. (Certainly at minimum IE11 on Windows 8.x but perhaps others).

I actually just fixed the case in the Admin CP that I thought it was grumbling about, and the warning was still present. Turns out the specific cause of it happening on the back end is:

Code:
a:link,
a:visited
{
    @property "link";
    color: @primaryMedium;
    text-decoration: none;
    @property "/link";
}

That's in xenforo.css - it therefore happens on the front end too. It happens in a few more cases there, in fact.

To put this into some perspective, the code we have used there isn't wrong. It isn't invalid in the spec. However, Microsoft have classified this as a potential "security" issue therefore they log a warning about that.

I disagree with that classification, though I could understand how it could lead to some confusion under some conditions.

For us, though, I think it's perfectly fine and valid. Bearing in mind it's a "warning" not an error, we're probably safe to ignore this.
 
That said, we can fix the Admin side style issue quite easily. It's just the warning will still be logged and it may be less feasible to change it in places on the front end.
 
We've solved the style issue, at least.

The warning itself is not something we will workaround and therefore is expected.
 
Back
Top Bottom