Thanks for such a useful utility, this is a godsend for working with multi resolution CSS!
Unfortunately though, there seems to be a bug related to multiplying by a float since ELisp casts to the most granular number type...
It seems like you're using natnump as a predicate for whether or not a number is positive or negative (see here), however, this predicate also checks the number is an integer.
Performing an operation of 100 × 0.75, like so;
(* 100 0.75) ;; 75.0
(natnump 75.0) ;; nil
(natnump 75) ;; t
Means natnump returns nil causing a cannot replace with negative number! error.
Could I suggest swapping out the predicate for just a (< 0 number)?
Thanks for such a useful utility, this is a godsend for working with multi resolution CSS!
Unfortunately though, there seems to be a bug related to multiplying by a float since ELisp casts to the most granular number type...
It seems like you're using
natnumpas a predicate for whether or not a number is positive or negative (see here), however, this predicate also checks the number is an integer.Performing an operation of
100 × 0.75, like so;Means
natnumpreturnsnilcausing acannot replace with negative number!error.Could I suggest swapping out the predicate for just a
(< 0 number)?