sass02
新建一个文件夹
1 cd 进入文件夹 ,cd E:\360data\重要数据\桌面\sass,
2 compass creat hello:当前目录创建sass工程,
3 sass文件夹放置sass文件,stylesheets生成的css文件,
4 compass create --bare --sass-dir "sass" --css-dir "css" --images-dir "img" --javascripts-dir "js" 指定创建的目录
5 E:\360data\重要数据\桌面\sass\hello\sass ,创建demo1.scss文件写样式,编译sass demo1.scss demo1.css编译成css文件,
6 sass -watch demo1.scss:demo1.css当scss文件变化的时候css文件自动变化
7 compass compile 编译文件 compass watch 监视文件的变化
8 config.rb:config.rubby文件,定义了一些路径。 require 'compass/import-once/activate'
# Require any additional compass plugins here. # Set this to the root of your project when deployed:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts" # You can select your preferred output style here (can be overridden via the command line):输出风格
# output_style = :expanded or :nested or :compact or :compressed # To enable relative paths to assets via compass helper functions. Uncomment: 是否使用绝对路径
# relative_assets = true # To disable debugging comments that display the original location of your selectors. Uncomment:是否使用注释
# line_comments = false
9 中文注释
Encoding.default_external = Encoding.find('utf-8') engine.rb文件路径:
C:\Ruby22-x64\lib\ruby\gems\2.2.0\gems\sass-3.4.15\lib\sass
demo1.scss
body{
background: lightgray;
font-size: 14px;
margin:0px;
margin-left:0px;
// this is the header style.
header{
font-weight: bold;
}
footer{/*! This is the footer style.重要注释,压缩模式也会编译到css文件*/
text-align: center;
}
}
demo1.css
@charset "UTF-8";
body {
background: lightgray;
font-size: 14px; }
body header {
font-weight: bold; }
body footer {
/*! This is the footer style.重要注释,压缩模式也会编译到css文件*/
text-align: center; } /*# sourceMappingURL=demo1.css.map */
sass02的更多相关文章
随机推荐
- 使用Python进行多线程检查.moe三位剩余有效域名
翻看博客看到一段不错的代码 虽然近期没有购买域名的需求 不过日后有购买域名的需求的话 稍作修改直接使用还是很方便的 import threading import requests import js ...
- Map和WeakMap的区别
个人总结:在一个变量作用域中,如果结束到作用域结尾 } 的话,map中的引用会被垃圾回收机制回收的是weakmap ,map中的引用不会被垃圾回收机制回收的是map. 强引用:只要引用存在,垃圾回收器 ...
- HDU-4370 '0 or 1' 最短路 要考虑连通性
题目链接:https://cn.vjudge.net/problem/HDU-4370 题意 给一个矩阵C(nn),要我们找到一个矩阵X(nn),满足以下条件: X_{12}+X_{13}+...X_ ...
- C语言传参的类型匹配
有一个这样的问题: 形参const char *p和实参char *c可以匹配 形参const char**p和实参char**c不可以匹配 注:argument和parameter:严格而言,par ...
- pip 出错
pip 升级到10以上出错 ImportError: cannot import name 'main' 解决方法一: 降低pip的版本号 python -m pip install pip==9.0 ...
- (50)与magento集成
我对接的是 odoo8 和 magento1.9.x 准备工作: l 服务器 装上mangento 组件 : $ pip install magento 装上 requests 组件:$ pip ...
- C语言编译和链接
编译链接是使用高级语言编程所必须的操作,一个源程序只有经过编译.链接操作以后才可以变成计算机可以理解并执行的二进制可执行文件. 编译是指根据用户写的源程序代码,经过词法和语法分析,将高级语言编写的代码 ...
- bzoj1193: [HNOI2006]马步距离(贪心+bfs)
1193: [HNOI2006]马步距离 题目:传送门 题解: 毒瘤题... 模拟赛时的一道题,刚开始以为是一道大难题...一直在拼命找规律 结果.... 还是说正解吧: 暴力的解法肯定是直接bfs, ...
- hdoj--5562--Clarke and food(模拟)
Clarke and food Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) ...
- 002.ES2015和ES2016新特性--箭头函数.md
1. ES2015中的箭头函数 JavaScript有一级函数的特性,也就是说,函数像其他值一样可以当成参数传来传去. var result = [1,2,3].reduce(function(tot ...