S
S
Std1372020-05-02 13:49:45
Sass
Std137, 2020-05-02 13:49:45

How to implement parent selector in sass?

The question is dumb. Looked all over the manuals, but...
As in a Sass preprocessor, not Scss, it's important to implement this kind of css construct.
. Sel1 {
}
.sel>li {
}
.sel>li:hover {
}

If you separate the three rules, then how it turns out, but I can’t find inheritance (indentation).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dubolom Unicellular, 2020-05-02
@duboloms

.Sel1 {
  &>li {
    &:hover {
     }
  }
}

A
Andrey Pastukhov, 2020-05-02
@tyllo

.sel
    &1
     display: block

    > li
        display: block

        &:hover
            display: block

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question