79810143

Date: 2025-11-05 13:53:02
Score: 1
Natty:
Report link
/**
 * Removes the unit from a value if it is unitless.
 *
 * @param {Number|String} $value - The value to strip the unit from.
 * @return {Number} - The value without its unit.
 */
@function strip-unit($value) {
    @if meta.type-of($value) == "number" and not math.is-unitless($value) {
       @return math.div($value, math.div($value, 1));
    } @else {
       @return $value;
    }
}
Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user31821067