D
D
Dmitry Klimantovich2018-12-04 17:42:05
Sass
Dmitry Klimantovich, 2018-12-04 17:42:05

Is it possible to put a reference to the parent in Sass in class nesting after the name increment?

Is it possible to put a reference to the parent in Sass in class nesting after the name increment? So Sass has this:

.col {
    &-span1 { width: 8.33%; }
    &-span2 { width: 16.66%; }
    &-span3 { width: 24.99%; }
}

We get:
.col-span1 { width: 8.33%; }
.col-span2 { width: 16.66%; }
.col-span3 { width: 24.99%; }

Is it possible so that when nesting, the name is substituted at the beginning of the parent's name? That is, the result is:
.span1-col { width: 8.33%; }
.span2-col { width: 16.66%; }
.span3-col { width: 24.99%; }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Kotov, 2018-12-04
@sk1llmuf

No.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question