Разрыв строки кода со многими: не в scss - PullRequest
0 голосов
/ 04 января 2019

Возможно, это глупый вопрос, но как я могу разбить эту строку кода (с большим количеством: нет), чтобы это не было так долго:

input {
  &:not(.ant-calendar-input):not(.ant-time-picker-panel-input):not(.ant-calendar-picker-input):not(.ant-time-picker-input) {
    width: 100%;
    height: 100px;
  }

Я пробовал это, но это не работает:

input {
  &:not(.ant-calendar-input),
  &:not(.ant-time-picker-panel-input),
  &:not(.ant-calendar-picker-input),
  &:not(.ant-time-picker-input) {
    width: 100%;
    height: 100px;
  }

1 Ответ

0 голосов
/ 04 января 2019

Ваш исходный SCSS эквивалентен следующему SCSS:

input {
  &:not(.ant-calendar-input) {
    &:not(.ant-time-picker-panel-input) {
      &:not(.ant-calendar-picker-input) {
        &:not(.ant-time-picker-input) {
          width: 100%;
          height: 100px;
        }
      }
    }
  }
}

Что выглядит немного лучше, чем SASS:

input
  &:not(.ant-calendar-input)
    &:not(.ant-time-picker-panel-input)
      &:not(.ant-calendar-picker-input)
        &:not(.ant-time-picker-input)
          width: 100%
          height: 100px
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...