Stylus没有将所有内容编译到一个.style文件中



真奇怪。手写笔是完美的工作,直到我复制粘贴一些css尝试。

当我添加这个到我的样式。样式文件:

.navigation
  list-style none
  background white
  width 100%
  height 100%
  position fixed
  top 0
  right 0
  bottom 0
  left 0
  z-index 0

编译成如下

.navigation,
list-style none,
background white,
width 100%,
height 100%,
position fixed,
top 0,
right 0,
bottom 0,
left 0,
z-index 0,

CSS的其余部分编译正常。

检查你的手写笔是否使用了空格缩进。

手写笔默认是tab缩进。但是你可以用4或2个空格如果你把它写在花括号里。

 .navigation {
    list-style none
    background white
    width 100%
    height 100%
    position fixed
    top 0
    right 0
    bottom 0
    left 0
    z-index 0
  }

可能是您在粘贴此代码的文件中有错误的缩进。你能出示原件吗?

相关内容

最新更新