1

Есть код .sass, без фигурных скобок {}

.header
  display:flex
  justify-content:space-between
.nav
  display:flex
  flex-direction:column
  align-items:center
  justify-content: space-between

как сделать вложенность не используя {} чтобы она работала ?

1 ответ 1

2

Для вложенности используйте знак амперсанда &
Для SCSS:

.header {
    display:flex
    justify-content:space-between
     & .nav {
      display:flex
      flex-direction:column
      align-items:center
      justify-content: space-between
      }
    }

Для SASS:

.header
  display: flex
  justify-content:space-between
  & .nav
    display:flex
    flex-direction:column
    align-items:center
    justify-content: space-between
4

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.