Unable to override user agent stylesheet by coloring my links

It is always these simple problems that bother me.

I have a very simple page that I create, and I want the hyperlinks not to be specially colored (not blue, not purple for visiting) or underlined.

I did this on other sites before without any problems, just using

a, a:visited, a:hover, a:active {
    text-decoration: none;
    color: none;
}

However, on this particular site, this does not do the trick for color, while underlining is successfully removed. I even tried to add a terrible tag !importantwith no effect.

This problem is observed in Chrome, IE 11 and Android (WebView).

When I check the links using the Chrome Developer console, it pulls its attribute colorfrom user agent stylesheet, namely:

a:-webkit-any-link {
    color: -webkit-link;
}

, , a:-webkit-any-link , color: none, . a:any-link a:link , .

, ?

+4
2

, color:none;, css.

:

a, a:visited, a:hover, a:active {
    text-decoration: none;
    color: inherit;
}
+10

color: inherit, . .

0

Source: https://habr.com/ru/post/1545255/


All Articles