Search code examples
csstwitter-bootstraphref

How can I disable the bootstrap hover color for links?


I am using Bootstrap.

Bootstrap defines

a:hover, a:focus {
    color: #005580;
    text-decoration: underline;
}

I have this links / CSS-classes

<a class="green" href="#">green text</a>
<a class="yellow" href="#">yellow text</a>

How can I disable the hoover color?

I want the green links to stay green and the yellow ones yellow, without overriding :hover for every single class? (this question is not mandatory dependent to bootstrap).

I need something like

a:hover, a:focus {
    color: @nonhoovercolor;
}

and I think

.yellow {
    color: yellow !important;
}

is not a good practice.


Solution

  • if anyone cares i ended up with:

    a {
        color: inherit;
    }