1.变量声明
$demo-color: red;
$demo-border: 1px solid $demo-color;
.a{
border: $demo-border;
}
2.嵌套
#a{
.a{
width: 1px
}
}
3.符号&,伪类选择
.bbc a{
color: red;
&:hover{
color: blue
}
}
4.群组嵌套
#content{
h1,h2,h3,h4{
border: solid
}
}
5.!default
//如果这个变量被声明赋值了,那就用它声明的值,否则就用这个默认值
$default-test: 4000px !default;
#div{
width: $default-test;
}
标签:Sass,记录,color,demo,学习,default,test,border,width
From: https://blog.csdn.net/m0_53785610/article/details/136768207