@extends在使用Stylus的Webstorm中不起作用

时间:2014-03-14 08:53:21

标签: webstorm stylus

我尝试使用Webstorm中的Stylus的@extend函数,然而,我无法让它工作。

示例:

   .icon-right
      color #fff
      width 35px
      height 35px
      line-height 40px
      font-size 1.4em
      text-align center
      position absolute
      top 35%
      left -4%


.icon-right-2
    @extends .icon-right
    background-color #999

输出:

/usr/local/bin/stylus stylus.styl

/usr/local/lib/node_modules/stylus/bin/stylus:545
          throw err;
                ^
Error: stylus.styl:227
 223| 
 224| 
 225|     .icon-righ-new
 226|       @extends .icon-right
  

227 |        228 |        229 |

Failed to @extend ".icon-right"

    at /usr/local/lib/node_modules/stylus/lib/visitor/normalizer.js:214:24
    at Array.forEach (native)
at Normalizer.extend (/usr/local/lib/node_modules/stylus/lib/visitor/normalizer.js:212:28)
at Normalizer.visitGroup (/usr/local/lib/node_modules/stylus/lib/visitor/normalizer.js:137:8)
at Normalizer.Visitor.visit (/usr/local/lib/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.visitBlock (/usr/local/lib/node_modules/stylus/lib/visitor/normalizer.js:112:19)
at Normalizer.Visitor.visit (/usr/local/lib/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.visitGroup (/usr/local/lib/node_modules/stylus/lib/visitor/normalizer.js:139:22)
at Normalizer.Visitor.visit (/usr/local/lib/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.visitBlock (/usr/local/lib/node_modules/stylus/lib/visitor/normalizer.js:112:19)

我尝试了不同的方法,但我收到了同样的错误。其他Stylus功能和Nib正在工作。

0 个答案:

没有答案