Sass 输出样式在更改时不会更新 [英] Sass output style doesn't update when changed
问题描述
我使用的是 Sass 3.2.1 (Media Mark),并使用了--watch main.scss:main.css --style compact" 例如,以该特定样式输出我的 css.看起来样式更改将在我删除 css 文件并打开它后仅生效.
I am using Sass 3.2.1 (Media Mark), and used "--watch main.scss:main.css --style compact " for example, to output my css in that particular style. It appears the style changes will take effect ONLY after I trash the css file and open it.
如果我返回scss文件并保存它,css返回到默认的scss.不应该--watch main.scss:main.css --style compact"使输出紧凑,直到我将其更改为--expanded, --compressed???
If I return to the scss file and save it, the css returns to the default scss. Shouldn't "--watch main.scss:main.css --style compact" make the output compact until i change it to --expanded, --compressed???
推荐答案
除非您的 Sass 文件发生变化,否则 Sass 不会重新编译 CSS,即使您已经切换了压缩类型.
Sass won't recompile the CSS unless there is a change to your Sass files, even if you've switched your compression type.
就我个人而言,我只有 2 个不同的手表,可以输出到 2 个不同的目录.带有 compact
的监视总是在运行并输出到我在 CVS 中的生产"目录.使用 expanded
的第二个监视仅在我需要调试时运行,并且输出到设置为被 CVS 忽略的目录.这样,就不会意外提交未压缩版本.
Personally, I just have 2 different watches that output to 2 different directories. The watch with compact
is always running and outputs to my "production" directory that is in CVS. The second watch using expanded
is only running when I need to debug and it outputs to a directory that's set to be ignored by CVS. This way, there's no accidentally committing the uncompressed version.
这篇关于Sass 输出样式在更改时不会更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!