RooksStrife RooksStrife - 2 months ago 13
Less Question

LESS- How to add .active to parent selector during inherency?

Not a LESS guy and I am assuming this is easy or not possible. I am trying to combine these into only having li > a once and have the .active applied within it. Similar to how you can have a &:first-child.

.nav {
apply styles;

li > a {
apply styles;
}

li.active > a {
apply styles;
}
}

Answer
.nav {
  li {
    & > a {}
    &.active a {}
}