garden
garden copied to clipboard
Multiplication of percentages
(percent* (percent 50) (percent 50))
=> #garden.types.CSSUnit{:unit :%, :magnitude 2500}
@Hendekagon Can you elaborate?
I guess a :magnitude
of 25
would be the expected result
@hkjels Thanks for parsing that one for me! A patch would be greatly appreciated. This definitely seems like unfavorable behavior.
This appears to be fixed:
user=> (require 'garden.units)
nil
user=> (garden.units/percent* (garden.units/percent 50) (garden.units/percent 50))
#garden.types.CSSUnit{:unit :%, :magnitude 25}
c.f., https://github.com/noprompt/garden/commit/75c2a4075848182ab08afaebfd8cadeae8156646