【发布时间】:2014-12-23 04:07:55
【问题描述】:
这是我的 sass 文件:
@import 'reset';
@import 'page';
@import 'colors';
@import 'typography';
$screen-xs: 480px !default;
$screen-xs-min: $screen-xs !default;
//there are more of these for each screen size: sm, md, lg
@media (min-width: $screen-xs-min) {
.thumbnail img {
height:64px !important;
}
}
//there are more of these @media queries, for each screen-<size>-min one
除了所有的@media 查询都编译为空的{} 块之外,所有似乎都编译得很好。
编译文件摘录:
h1.bottom{font-weight:bold;color:#03bbc1;margin-top:-8px !important}@media (min-width: 480px){}@media (min-width: 768px){}@media (min-width: 992px){}@media (min-width: 1200px){}
我做错了什么?
使用 nodejs 和 grunt 编译 scss 文件。当我更改文件时,grunt 会报告以下内容:
>> File "sass/styles.scss" changed.
Running "sass:dist" (sass) task
File public/css/styles.css created.
File public/css/styles.css.map created.
Done, without errors.
所以一切看起来都很好......
【问题讨论】:
-
你的代码没有问题,你的编译器有问题:sassmeister.com/gist/4a1bf577ac941209d925
-
好的,我明白了...感谢您指出这一点!