[Pkg-javascript-commits] [less.js] 07/09: fix regression with jsifying code - all dimensions would be rounded. Fixes #2057
Jonas Smedegaard
dr at jones.dk
Mon Oct 26 23:22:45 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag v1.7.2
in repository less.js.
commit 04cb8bdfb21f691285f83e18bd4bad23fad53622
Author: Luke Page <luke.a.page at gmail.com>
Date: Wed Jun 18 06:18:02 2014 +0100
fix regression with jsifying code - all dimensions would be rounded. Fixes #2057
---
lib/less/tree.js | 4 ++--
test/css/javascript.css | 5 +++++
test/less/javascript.less | 9 +++++++++
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/lib/less/tree.js b/lib/less/tree.js
index cd1352f..d7ccd97 100644
--- a/lib/less/tree.js
+++ b/lib/less/tree.js
@@ -43,9 +43,9 @@ tree.find = function (obj, fun) {
tree.jsify = function (obj) {
if (Array.isArray(obj.value) && (obj.value.length > 1)) {
- return '[' + obj.value.map(function (v) { return v.toCSS(false); }).join(', ') + ']';
+ return '[' + obj.value.map(function (v) { return v.toCSS(); }).join(', ') + ']';
} else {
- return obj.toCSS(false);
+ return obj.toCSS();
}
};
diff --git a/test/css/javascript.css b/test/css/javascript.css
index 8268ab3..9cc1c3e 100644
--- a/test/css/javascript.css
+++ b/test/css/javascript.css
@@ -21,3 +21,8 @@
ary: "1, 2, 3";
ary1: "1, 2, 3";
}
+.test-tran {
+ 1: opacity 0.3s ease-in 0.3s, max-height 0.6s linear, margin-bottom 0.4s linear;
+ 2: [opacity 0.3s ease-in 0.3s, max-height 0.6s linear, margin-bottom 0.4s linear];
+ 3: opacity 0.3s ease-in 0.3s, max-height 0.6s linear, margin-bottom 0.4s linear;
+}
diff --git a/test/less/javascript.less b/test/less/javascript.less
index b826a78..a8e7eb3 100644
--- a/test/less/javascript.less
+++ b/test/less/javascript.less
@@ -27,3 +27,12 @@
ary: `@{ary}.join(', ')`;
ary1: `@{ary2}.join(', ')`;
}
+.transitions(...) {
+ @arg: ~`"@{arguments}".replace(/[\[\]]*/g, '')`;
+ 1: @arg; // rounded to integers
+ 2: ~`"@{arguments}"`; // rounded to integers
+ 3: @arguments; // OK
+}
+.test-tran {
+ .transitions(opacity 0.3s ease-in 0.3s, max-height 0.6s linear, margin-bottom 0.4s linear;);
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git
More information about the Pkg-javascript-commits
mailing list