V
V
Vadim Ardanov2017-09-15 10:52:08
css
Vadim Ardanov, 2017-09-15 10:52:08

How to access the parent block using a variable in sass?

Good afternoon.
This is something like this should be in SCSS, I need it in SASS.
But something does not compile

.Block {
  $p: &;
  &-element { /* */ }

  &--modifier {
    #{$p}-element { /* */ }
  }
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question