The result of str(float) was changed with Python3: % python Python 2.7.3 (default, Apr 14 2012, 08:58:41) [GCC] on linux2 >>> repr(1.1*1.1) '1.2100000000000002' >>> str(1.1*1.1) '1.21' % python3 Python 3.3.0 (default, Oct 01 2012, 09:13:30) [GCC] on linux >>> repr(1.1*1.1) '1.2100000000000002' >>> str(1.1*1.1) '1.2100000000000002' Thus, instead of rounding the resulting CSS, don't use str() but rather repr() to return the correct value in with_unit().
4.8 KiB
4.8 KiB