Dan*_*Dan 8 css sass css-preprocessor
我正在使用媒体查询mixins编译我的sass文件时出错.我按照几个教程,但它不会编译.我正在使用Sass 3.3.0.alpha.67 (Bleeding Edge).
这是我的代码
/* Included at the end */
@mixin mobile-only {
@media (max-width : 320px) {
@content;
}
}
/* Included where the rest of my sass is */
body { @include mobile-only {
display: none;
}
}
Run Code Online (Sandbox Code Playgroud)
我正在使用scout编译并观察变化.还有什么我需要做的吗?
似乎不再是问题了。稍微修改过的代码在此 codepen http://codepen.io/danielcgold/pen/RRNrPQ中进行了解释。
@mixin start-desktop-size {
@media (min-width: 1024px) {
@content;
}
}
body {
@include start-desktop-size {
background: red;
}
}
Run Code Online (Sandbox Code Playgroud)