SEC7115 :: visited and: link styles can only differ in color. Some styles did not apply to: visit.

I launched my sharepoint nder IE F12 website and the console mentioned the following error at the beginning of my HTML: -

SEC7115: :visited and :link styles can only differ by color. Some styles were not applied to :visited. 

And what is this mistake? and how can i fix it? Thanks

+7
html html5 sharepoint
source share
3 answers

Change only the color attribute for CSS rules that contains: visited or: link selector

http://msdn.microsoft.com/en-us/library/ie/hh180764%28v=vs.85%29.aspx

+6
source share

This is a safety feature. This question also concerns the same problem and contains a link to this page , which is very informative and interesting.

Basically :visited can pose a serious security risk to users (for example, when used in conjunction with getComputedStyle() ), and therefore browsers severely limit what you can do with it.

To fix this, delete: visited from the list of CSS element selectors (traditionally some style sheets combine all psuedo classes: a:link, a:visited, a:hover, a:active { styles here } ) and style it separately, only applying color .

+2
source share

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 .

+1
source share

All Articles