0
CSS混入少混入返回Nanpx
.rhythm(@font-scale, @margin-top : false, @margin-bottom : false)
when (@font-scale > 0) {
@new-font-size: round(@base-font-size * pow(@base-scale-factor, @font-scale));
font-size: @new-font-size;
line-height: ceil((@new-font-size/(@base-line-height * @base-font-size))) * (@base-line-height * @base-font-size);
}
.rhythm(@font-scale, @margin-top : false, @margin-bottom : false)
when (@font-scale = 0) {
@new-font-size: round(@base-font-size * pow(@base-scale-factor, @font-scale));
font-size: @new-font-size;
line-height: ceil((@new-font-size/(@base-line-height * @base-font-size))) * (@base-line-height * @base-font-size);
}
.rhythm(@font-scale, @margin-top : false, @margin-bottom : false)
when (isnumber(@margin-top)) {
margin-top: @base-font-size * (@base-line-height * @margin-top);
}
.rhythm(@font-scale, @margin-top : false, @margin-bottom : false)
when (isnumber(@margin-bottom)) {
margin-bottom: @base-font-size * (@base-line-height * @margin-bottom);
}
用法:
p {
.rhythm(4, 1, 2);
}
輸出:
有人能幫助我的字體大小搞清楚這個問題?
奇怪的是,我一直在試圖編譯它使用lessphp和winless他們都給我錯誤.. :-) – Bogdan