Css 非法嵌套:导入指令下不能嵌套任何内容
我正在使用Rails4.2和引导sass->3.2.0GEM。我将css转换为sass并添加到application.css.sass文件中 Im获取非法嵌套:导入指令下不能嵌套任何内容。Css 非法嵌套:导入指令下不能嵌套任何内容,css,ruby-on-rails,ruby,twitter-bootstrap,Css,Ruby On Rails,Ruby,Twitter Bootstrap,我正在使用Rails4.2和引导sass->3.2.0GEM。我将css转换为sass并添加到application.css.sass文件中 Im获取非法嵌套:导入指令下不能嵌套任何内容。 @import "bootstrap" height: 5px border-top: 0 background: #c4e17f border-radius: 5px 关于我为什么会遇到这个问题,有什么想法吗。试试这个: 不要缩进样式、创建类或将其放入html标记中 例如: @impor
@import "bootstrap"
height: 5px
border-top: 0
background: #c4e17f
border-radius: 5px
关于我为什么会遇到这个问题,有什么想法吗。试试这个:
不要缩进样式、创建类或将其放入html标记中
例如:
@import "bootstrap"
body {
height: 5px
border-top: 0
background: #c4e17f
border-radius: 5px
}
或
从您的代码示例中,我看到您没有将样式与任何类或id关联 它看起来像
.container
height: 5px
border-top: 0
background: #c4e17f
border-radius: 5px
.container
height: 5px
border-top: 0
background: #c4e17f
border-radius: 5px