@which
$types: 4;
$type-width: 20px;
@while $types > 0 {
.while-#{$types} {
width: $type-width + $types;
}
$types: $types - 1;
}
@for $i from 4 through 1{
.while-#{$i}{
width:$type-width + $i
}
}
$types: 4;
$type-width: 20px;
@while $types > 0 {
.while-#{$types} {
width: $type-width + $types;
}
$types: $types - 1;
}
@for $i from 4 through 1{
.while-#{$i}{
width:$type-width + $i
}
}
2016-12-26
$list: archer saber lancer caster rider;
@each $eachTest in $list{
.nav.#{$eachTest}{
width: 10px;
background-image: url("imagers/#{$eachTest}.png");
}
}
@each $eachTest in $list{
.nav.#{$eachTest}{
width: 10px;
background-image: url("imagers/#{$eachTest}.png");
}
}
2016-12-19
@mixin ifTest($test:true,$test2:true){
@if $test{
width: $test;
}
@else if $test2{
height: $test2;
}
@else{
width: 50px;
height: 50px;
}
}
.boxs{
@include ifTest(10px)
}
.boxs2{
@include ifTest(false,20px)
}
.boxs3{
@include ifTest(false,false)
}
@if $test{
width: $test;
}
@else if $test2{
height: $test2;
}
@else{
width: 50px;
height: 50px;
}
}
.boxs{
@include ifTest(10px)
}
.boxs2{
@include ifTest(false,20px)
}
.boxs3{
@include ifTest(false,false)
}
2016-12-19
#main {
@import "example";
}
編譯不通過。是因為這里的"example"是個scss文件,類名繼承應該用@extend .example
@import "example";
}
編譯不通過。是因為這里的"example"是個scss文件,類名繼承應該用@extend .example
2016-12-18
如果你有一個 SCSS 或 Sass 文件需要引入, 但是你又不希望它被編譯為一個 CSS 文件, 這時,你就可以在文件名前面加一個下劃線,就能避免被編譯。
就是帶下劃線前綴的scss文件不會編譯成css文件,在koala中編譯時會沒有該文件;
但可以在其他scss中@import該文件后編譯,而且不用加下劃線前綴.
就是帶下劃線前綴的scss文件不會編譯成css文件,在koala中編譯時會沒有該文件;
但可以在其他scss中@import該文件后編譯,而且不用加下劃線前綴.
2016-12-18