该选择器没有任何属性,并且不会被渲染(无缘无故)

hun*_*haw 3 sass node.js

我正在渲染一个简单的 sass 文件并收到以下警告:

\n\n
This selector doesn't have any properties and won't be rendered.\n   \xe2\x95\xb7\n14 \xe2\x94\x82     position:fixed\n   \xe2\x94\x82     ^^^^^^^^^^^^^^\n   \xe2\x95\xb5\n\nWARNING on line 17, column 9 of test.sass: \nThis selector doesn't have any properties and won't be rendered.\n   \xe2\x95\xb7\n17 \xe2\x94\x82         display:inline-block\n   \xe2\x94\x82         ^^^^^^^^^^^^^^^^^^^^\n   \xe2\x95\xb5\n
Run Code Online (Sandbox Code Playgroud)\n\n

这是文件:

\n\n
html, body \n    width:100%\n    min-height:100vh\n    margin:0\n    padding:0\n.header\n    background-color:#ffffffb2\n    border-bottom:#0000004c\n    box-shadow:0 0 20px #0000004c\n    top:0px\n    left:0px\n    right:0px\n    height:70px\n    position:fixed\n    a\n        font-size:1rem\n        display:inline-block\n        padding:2rem 3rem\n        color:#0000004c\n
Run Code Online (Sandbox Code Playgroud)\n\n

我确实需要在输出 css 中呈现这些位置和显示样式,而且我看不出 sass 会抱怨它们的任何原因。有人发现我的代码有问题吗?

\n

Ari*_*Ari 7

s后面需要一个空格:,请查看DEMO