A
A
Alibek Kulseitov2017-10-15 23:21:46
Less
Alibek Kulseitov, 2017-10-15 23:21:46

How to implement this in less?

.navigation {
    float: right;

    &__item {
        display: inline-block;
    }
    &__link {
        font-size: 14px;
        color: #c3c3c3;
        text-transform: uppercase;
        text-decoration: none;
        display: block;
        padding: 0 15px;

        &:hover,
        &:focus,
        &.open {
            color: #f58345;
        }
    }
}

How to write the code correctly so that if the .navigation__item class is added to the .open class, then the .navigation__link becomes the same color as with hover and focus?
And to be more precise, this bootstrap dropdown adds class .open.
I need css to output
.navigation__item.open .navigation__link {color: red}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danakt Frost, 2017-10-15
@AlibekKulseitov

.navigation {
    &__item.open &__link {
      color: red
    }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question