将LESS Mixin转换为Stylus Mixin

时间:2015-11-21 00:08:29

标签: css less mixins stylus

我有以下Less Mixin可以帮助我做出回应:

eventRegister.exe {path-to-dll-with-your-eventsource-class} {manifest-output-file-prefix}

我想将它转换为Stylus Mixin,我有这个代码,但它不起作用:

wevtutil.exe 
   im {EtwManifestManFile} 
   /rf:"{EtwManifestDllFile}" 
   /mf:"{EtwManifestDllFile}"

我这样使用它:

.mobile-first(@minWidth, @rulesSet) {
    @media only screen and (min-width: @minWidth) {
        @rulesSet();
    }
}

希望你们能帮帮我。

问候!

1 个答案:

答案 0 :(得分:2)

你需要在这里使用block mixins。像这样:

// This mixin accepts any block of code if called with + sign.
// The provided block is stored in "block" variable
// and expanded if used inside an interpolation ({}).
mobile-first($minWidth)
  @media only screen and (min-width: $minWidth)
    {block}

body
  font-family Helvetica, Arial, sans-serif
  font-size 100%
  line-height 1.5em
  color #2a2a2a
  -webkit-font-smoothing antialiased
  // calling it with a block
  +mobile-first(1200px)
    background-color pink