为什么这不适用于手写笔?
gutter = 2%
get(numerator, denominator)
x = (numerator / denominator) * 100% // get(1, 4) returns 25% as it should
(x) - gutter // returns x as 24.5% wtf
在Sass中正常工作
$gutter: 2%;
@function foo($numerator, $denominator) {
$x: ($numerator / $denominator) * 100%;
@return $x - $gutter;
}
foo {
width: foo(1, 4); // returns 23% as it should
}
答案 0 :(得分:2)
gutter = 2
get(numerator, denominator)
x = (numerator / denominator) * 100 // get(1, 4) returns 25% as it should
width ((x) - (gutter))% // returns x as 24.5% wtf
span
display inline-block
height 40px
get(1, 4)