- (Sass::Script::Value::Bool) unitless($number)
Returns whether a number has units.
Examples:
unitless(100) => true
unitless(100px) => false
Parameters:
$number (Sass::Script::Value::Number)
Returns:
(Sass::Script::Value::Bool)
Raises:
(ArgumentError) — if $number isn't a number
该scss 函数接受一个scssscript 变量,用于判断接收的值是否带有单位,如果是则返回false,否则返回true.