sass编译
2015-10-12 16:05
495 查看
命令行编译
单文件转换命令sass style.scss style.css单文件监听命令
sass --watch style.scss:style.css文件夹监听命令
sass --watch sassFileDirectory:cssFileDirectorycss文件转成sass/scss文件(在线转换工具css2sass)
sass-convert style.css style.sass sass-convert style.css style.scss
命令行其他配置选项
运行命令行帮助文档,可以获得所有的配置选项sass -h我们一般常用的有
--style,
--sourcemap,
--debug-info等。
sass --watch style.scss:style.css --style compactsass --watch style.scss:style.css --sourcemapsass --watch style.scss:style.css --style expanded --sourcemapsass --watch style.scss:style.css --debug-info
--style表示解析后的css是什么格式,有四种取值分别为:
nested,
expanded,
compact,
compressed。
--sourcemap表示开启sourcemap调试。开启sourcemap调试后,会生成一个后缀名为
.css.map文件。
--debug-info表示开启debug信息,升级到3.3.0之后因为sourcemap更高级,这个debug-info就不太用了。
四种style生成后的css
// nested#main { color: #fff; background-color: #000; } #main p { width: 10em; }.huge { font-size: 10em; font-weight: bold; text-decoration: underline; }// expanded#main { color: #fff; background-color: #000;}#main p { width: 10em;}.huge { font-size: 10em; font-weight: bold; text-decoration: underline;}// compact#main { color: #fff; background-color: #000; }#main p { width: 10em; }.huge { font-size: 10em; font-weight: bold; text-decoration: underline; }// compressed#main{color:#fff;background-color:#000}#main p{width:10em}.huge{font-size:10em;font-weight:bold;text-decoration:underline}
相关文章推荐
- codeforces #568B Symmetric and Transitive 快速傅里叶变换
- 发散思维题——不用加减乘除做加法(剑指offer)
- iPhone手机安全指南
- iPhone手机安全指南
- sass安装
- 解读ASP.NET 5 & MVC6系列(14):View Component
- android 应用程序框架
- 《Cocos2d-JS开发之旅》重印在即,感谢大家的支持
- cocos2d-x入门三 分层设计框架
- mysql 远程访问
- qt error: C2001: 常量中有换行符
- 黑马程序员——Java基础--------IO流(二)
- Python Flask script 使用
- qualcomm platform camera
- RabbitMQ搭建和管理
- 解读ASP.NET 5 & MVC6系列(13):TagHelper
- 总结的一些MySQL索引相关的知识点
- C# 与C++的数据转换
- Python随机数
- 在Eclipse中使用JUnit4进行单元测试