CSS lint 抛出错误

标签 css csslint

csslint.net正在为以下 css 抛出错误,我不知道为什么。我认为这对于 css 来说是很正常的。我从这个 site 得到了 css .

body {
    background: #eee !important;    
}

.wrapper {  
    margin-top: 80px;
  margin-bottom: 80px;
}

.form-signin {
  max-width: 380px;
  padding: 15px 35px 45px;
  margin: 0 auto;
  background-color: #fff;
  border: 1px solid rgba(0,0,0,0.1);  

  .form-signin-heading,
    .checkbox {
      margin-bottom: 30px;
    }

    .form-control {
      position: relative;
      font-size: 16px;
      height: auto;
      padding: 10px;
        @include box-sizing(border-box);

        &:focus {
          z-index: 2;
        }
    }

    input[type="text"] {
      margin-bottom: -1px;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
    }

    input[type="password"] {
      margin-bottom: 20px;
      border-top-left-radius: 0;
      border-top-right-radius: 0;
    }
}

有人可以帮助我吗?我真的不知道它有什么问题。

最佳答案

它的格式非常错误,将它运行到任何带有颜色语法突出显示的编辑器中,你会看到一些规则缺少右括号或者它们嵌套不正确 - 你不能在 CSS 中嵌套普通规则(媒体查询是一个异常(exception))。

您需要检查您的代码并确保您没有尝试嵌套规则。

关于CSS lint 抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27988281/

相关文章:

html - 在我的 html 显示中获得正确的 Angular

html - Bootstrap 3 文本在页面调整期间进入下一个容器

javascript - 如何在 stylelint 配置 js 中添加特定规则的忽略文件

javascript - 如何在固定高度和固定宽度的 div 中包含 fullscreen.js 幻灯片

Javascript - 如何更改动画的持续时间 onclick

css - IE8 网站显示问题 - 虚拟桌面

css - 如何安装和使用我为 CLI 编写的自定义 CSLint 规则?

CSSLint : Unknown property "fill"

atom-editor - 如何在 Atom 的 CSLint 中使用 .csslintrc 来忽略规则?

CSS - linter 与美化器不一致