标签:guide watch round clu css element col for odi
choco install sass
tip:首先需要安装好chocolatey
sass input.scss output.css
sass --watch input.scss output.css
sass --watch app/sass:public/stylesheets // directory seperating by colon
$font18:18px;
.font{
font-size:$font18;
}
// 字符串中用 #{}
$dir:bottom;
.border {
border-#{$dir}:1px solid gray;
}
<div class="block">
<div class="block_elemenet">this is a title
<div class="block_element-modifier">modifier</div>
</div>
</div>
.block {
.block_element {
.block_element--modifier {
}
}
}
// "_reset.scss"
@import 'reset';
body {
font: 100% Helvetica, sans-serif;
background-color: #efefef;
}
@mixin transform($property) {
-webkit-transform: $property;
-ms-transform: $property;
transform: $property;
}
.box { @include transform(rotate(30deg)); }
.class1 {
}
.class2 {
@extend .class1;
}
// 可以使用运算符
.class {
width: 600px / 960px * 100%;
}
参考:
标签:guide watch round clu css element col for odi
原文地址:https://www.cnblogs.com/rosendolu/p/11111786.html