0
我对sass很陌生,在我的生活中,我不知道为什么这个特定的变量实例搞乱了我的.css输出。我使用Atom.io作为我的文本编辑器,插件sass-autocompile作为我的sass编译器。SASS(.sass)为什么这个变量混淆了一切?
这里是我的代码
萨斯:
$white: #fdfcfc
$black: #040A14
.dark-btn
color: $white
display: block
font-weight: bold
margin: auto
background: $black
padding: 10px
width: 200px
text-align: center
&:hover
background: $gray
animation-name: popUp
animation-fill-mode: forwards
animation-duration: 200ms
后,它编译我得到这个:
.dark-btn {
color: #fdfcfc;
color-display: block;
color-font-weight: bold;
color-margin: auto;
color-background: #040A14;
color-padding: 10px;
color-width: 200px;
color-text-align: center;
}
.dark-btn:hover {
background: #333;
animation-name: popUp;
animation-fill-mode: forwards;
animation-duration: 200ms;
}
它基本上增加了“颜色”的一切。我在这里做错了什么?
较少的代码转储和更多的“变量”隔离示例,包括显示预期的情况和/或没有“变量”的情况。 – user2864740
如果在Atom中启用可见空白,会发生什么情况? – user2864740
谢谢,有应该有标签的空间 –