Usually a warning
SEC7115: :visited and :link styles can only differ by color. Some styles were not applied to :visited.
is false positive. Internet Explorer "Development Tools F12" is not smart enough to understand that
a:link, a:visited { border: solid red 1px; }
not a leak, not even a tight getComputedStyle() . As explained in https://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/ and https://dbaron.org/mozilla/visited-privacy if :visited visually different from :link , and JavaScript can detect this difference, JS can overload the browser history.
However, the IE detection of this case is low enough that it cannot understand that there is no visual difference between :link (uncaught link) and :visited (visited link). I think heuristics are just if (selector_contains_visited && rule_contains_property_other_than_color) { emit_warning(); } if (selector_contains_visited && rule_contains_property_other_than_color) { emit_warning(); } .
Sorry, you cannot solve the problem. Most user agents have default stylesheets, which require that the authorβs stylesheet matches both :link and :visited (since regular user agents do not support a pseudo selector matching both invisible and visited links, and specificity rules require at least one pseudo-selector), As a result, you need to specify :link, :visited {...} , and IE will display the warning above if the rule block contains any other property that is color .
Mikko antalainen
source share