diff options
author | Eevee (Lexy Munroe) <eevee.git@veekun.com> | 2016-06-08 18:43:11 -0700 |
---|---|---|
committer | Eevee (Lexy Munroe) <eevee.git@veekun.com> | 2016-06-08 18:43:11 -0700 |
commit | 9ea91782b4b4dacc144454db14c32e9302e9347b (patch) | |
tree | d5eef8f47153aeba3ce3c077829b946203917ac9 /scss/tests | |
parent | 8ded7bef22819a080299a3b0dd32fd08b8dbdff7 (diff) | |
download | pyscss-9ea91782b4b4dacc144454db14c32e9302e9347b.tar.gz |
Avoid precision loss when converting between units. Fixes #330
Diffstat (limited to 'scss/tests')
-rw-r--r-- | scss/tests/files/bugs/unit-float-precision.css | 3 | ||||
-rw-r--r-- | scss/tests/files/bugs/unit-float-precision.scss | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/scss/tests/files/bugs/unit-float-precision.css b/scss/tests/files/bugs/unit-float-precision.css new file mode 100644 index 0000000..16e9d86 --- /dev/null +++ b/scss/tests/files/bugs/unit-float-precision.css @@ -0,0 +1,3 @@ +a { + width: 702px; +} diff --git a/scss/tests/files/bugs/unit-float-precision.scss b/scss/tests/files/bugs/unit-float-precision.scss new file mode 100644 index 0000000..a57b294 --- /dev/null +++ b/scss/tests/files/bugs/unit-float-precision.scss @@ -0,0 +1,7 @@ +// A number of pixels is actually stored internally as millimeters, which +// causes some slight precision issues in corner cases. In this case, the +// answer came out as 701px rather than 702px, because the subtraction yielded +// 701.99999999px. +a { + width: floor(742px - 40px); +} |