E
E
EA-EKB2019-06-22 17:51:14
Sass
EA-EKB, 2019-06-22 17:51:14

Is it possible in SCSS to use & on .class1, .class2 so that we get .class1.subclass, .class2.subclass?

Good day.
Is it possible in SCSS to use & on .class1, .class2 so that we get .class1.subclass, .class2.subclass?
Those. from:

.class1, .class2 {
    &_subclass {
        color: #CCC;
    }
}

after compilation get this:
.class1_subclass, .class2_subclass {
    color: #CCC;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2019-06-23
@EA-EKB

If you need a dot, then write a dot =)

.class1, .class2 {
    &.subclass {
        color: #CCC;
    }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question