Wildcards in css for all states of a:hover, focus etc?

Viewed 1391

Is it possible to apply a specific css property to any states of an element?

Eg the following is invalid:

.navbar .navbar-nav > .active > a*

Right now I always have to repeat the css classes for each state of the a element, like:

.navbar .navbar-nav > .active > a,
.navbar .navbar-nav > .active > a:hover,
.navbar .navbar-nav > .active > a:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: inherit;
}
5 Answers
Related