In Twitter Bootstrap v. 2.3.2 navbar.less
file, you can find this code:
// Active nav items
.navbar .nav > .active > a,
.navbar .nav > .active > a:hover,
.navbar .nav > .active > a:focus {
color: @navbarLinkColorActive;
text-decoration: none;
background-color: @navbarLinkBackgroundActive;
.box-shadow(inset 0 3px 8px rgba(0,0,0,.125));
}
Now, the 'problem' is that my 'li' does not have the class .active
, but .current-menu-item
. But I still want to apply the above CSS to the a
element. So in my own style.less
file, I added:
li.current-menu-item a {
.navbar .nav > .active > a;
}
But for some reason this is not working. I'm not able to figure out why it is not working. To illustrate, I want to give a example that IS working.
In Twitter Bootstrap v. 2.3.2 you can find type.less
that has the following code:
// Single-line list items
ul.inline,
ol.inline {
margin-left: 0;
list-style: none;
> li {
display: inline-block;
.ie7-inline-block();
padding-left: 5px;
padding-right: 5px;
}
}
For horizontal menu, where in the source code my ul
element does not have a class .inline
, but .menu
, I simply do this in my own style.less
:
ul.menu {
ul.inline;
}
That is working with NO problems at all. Can anybody help me out?