不是提交不了,而是需要調(diào)用 div{
@include border-radius;
} 加進(jìn)去試試
@include border-radius;
} 加進(jìn)去試試
2016-12-28
$bodyWidth : 200px;
$bodyHeight : 300px;
$font-siz : 20px;
body{
width : $bodyWidth;
height : $bodyHeight;
font-size : $font-siz;
}
$bodyHeight : 300px;
$font-siz : 20px;
body{
width : $bodyWidth;
height : $bodyHeight;
font-size : $font-siz;
}
2016-12-28
https://robots.thoughtbot.com/sass-source-maps-chrome-magic
1. Run a sass watch
2. Create a workspace
3. Map to network resource
4. Edit directly in DevTools
1. Run a sass watch
2. Create a workspace
3. Map to network resource
4. Edit directly in DevTools
2016-12-27
//定義宏
@mixin border-radius($radius:5px){
-webkit-border-radius:#radius;
border-radius:$radius;
}
//大部分樣式一致時(shí) 使用默認(rèn)設(shè)定的 5px
.box{
@include border-radius;
}
//個(gè)別樣式不一樣時(shí)
.box1{
@include boder-radius(50%);
}
@mixin border-radius($radius:5px){
-webkit-border-radius:#radius;
border-radius:$radius;
}
//大部分樣式一致時(shí) 使用默認(rèn)設(shè)定的 5px
.box{
@include border-radius;
}
//個(gè)別樣式不一樣時(shí)
.box1{
@include boder-radius(50%);
}
2016-12-27
//定義宏
@mixin border-radius($radius){
-webkit-border-radius:$radius;
}
@mixin border-radius($radius){
-webkit-border-radius:$radius;
}
2016-12-27
$linkColor: #08c #333 !default;
$bdcolor:#c30 #f60;
a{
color:nth($linkColor,1);
&:hover{
color:nth($linkColor,2);
border-style:dashed;
border-width:2px;
border-color:join($linkColor,$bdcolor);
}
}
$bdcolor:#c30 #f60;
a{
color:nth($linkColor,1);
&:hover{
color:nth($linkColor,2);
border-style:dashed;
border-width:2px;
border-color:join($linkColor,$bdcolor);
}
}
2016-12-25
#{} 這個(gè)插值的運(yùn)用, 感覺就是字符串的加法操作, 變量的加法操作是對(duì)值的操作, 而變量查找的過程會(huì)導(dǎo)致一個(gè)未知變量的錯(cuò)誤,所以無(wú)效?;旌虾暌矊儆谧兞康姆懂?。而@extend所使用的是字符串,操作自然有效。
2016-12-23
總結(jié)了一下,有兩種情況不能使用插值:
一、插值不能使用在屬性值,也就是:后邊不能使用插值;
二、插值不能使用在混合宏的調(diào)用中,如@include update-#{$flag}
但是,如果使用占位符%,用@extend調(diào)用就可以。
一、插值不能使用在屬性值,也就是:后邊不能使用插值;
二、插值不能使用在混合宏的調(diào)用中,如@include update-#{$flag}
但是,如果使用占位符%,用@extend調(diào)用就可以。
2016-12-23