为什么会出现无降序错误?

时间:2018-10-22 09:37:12

标签: sass stylelint

这是一个例子:

.something {
  & > * {
    &:not(:first-child) {
      margin-right: 16px;
    }
    &:not(:last-child) {
      margin-left: 16px;
    }
  }
  &-element {
    & > * { /* Expected selector ".something-element > *" to come before selector ".something > *:not(:first-child)" (no-descending-specificity) */
      &:not(:first-child) {
        margin-top: 16px;
      }
      &:not(:last-child) {
        margin-bottom: 16px;
      }
    }
  }
}

我的stylelint.config.json:

module.exports = {
  extends: ['stylelint-config-recommended-scss'],
};

如何修复stylelint错误?也许是错误?

0 个答案:

没有答案