在我的 sass 代码中,我有内联注释,我希望在崇高的文本中删除它们。是否可以单独永久删除所有评论内容?
@function emCalc($values) {
$emValues: '';
$max: length($values); //Get the total number of parameters passed
@for $i from 1 through $max {
$value: (nth($values, $i)); //Take the individual parameter
$value: $value / ($value * 0 + 1); //Doing this gets you one unit (1px)
$value: $value / $em-base * 1em; //Divide the px value by emBase and return the value as em
$emValues: #{$emValues + $value}; //Append to array
@if $i < $max {
$emValues: #{$emValues + " "}; //Adding space between parameters (except last), if there are multiple parameters
}
}
@return $emValues; //Call emCalc like so emCalc(10, 20, 30, 40) it should return margin: 0.625em 1.25em 1.875em 2.5em
}