[Pkg-javascript-commits] [less.js] 39/58: Keyframes, supports and other directives should work with import reference. #2008
Jonas Smedegaard
dr at jones.dk
Mon Oct 26 23:28:30 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag v2.3.0
in repository less.js.
commit ed9b6efb1302939d122429f5a3e5aa8345960565
Author: jurcovicovam <meri at meri.org>
Date: Thu Jan 22 14:03:00 2015 +0100
Keyframes, supports and other directives should work with import
reference. #2008
---
lib/less/tree/directive.js | 5 +++--
test/css/import-reference.css | 11 +++++++++++
test/less/import-reference.less | 4 +++-
test/less/import/import-reference.less | 15 +++++++++++++++
4 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/lib/less/tree/directive.js b/lib/less/tree/directive.js
index e189128..1bbe506 100644
--- a/lib/less/tree/directive.js
+++ b/lib/less/tree/directive.js
@@ -1,7 +1,7 @@
var Node = require("./node"),
Ruleset = require("./ruleset");
-var Directive = function (name, value, rules, index, currentFileInfo, debugInfo) {
+var Directive = function (name, value, rules, index, currentFileInfo, debugInfo, isReferenced) {
this.name = name;
this.value = value;
if (rules) {
@@ -11,6 +11,7 @@ var Directive = function (name, value, rules, index, currentFileInfo, debugInfo)
this.index = index;
this.currentFileInfo = currentFileInfo;
this.debugInfo = debugInfo;
+ this.isReferenced = isReferenced;
};
Directive.prototype = new Node();
@@ -56,7 +57,7 @@ Directive.prototype.eval = function (context) {
rules.root = true;
}
return new Directive(this.name, value, rules,
- this.index, this.currentFileInfo, this.debugInfo);
+ this.index, this.currentFileInfo, this.debugInfo, this.isReferenced);
};
Directive.prototype.variable = function (name) { if (this.rules) return Ruleset.prototype.variable.call(this.rules, name); };
Directive.prototype.find = function () { if (this.rules) return Ruleset.prototype.find.apply(this.rules, arguments); };
diff --git a/test/css/import-reference.css b/test/css/import-reference.css
index f25f4b1..27a14db 100644
--- a/test/css/import-reference.css
+++ b/test/css/import-reference.css
@@ -66,3 +66,14 @@ div#id.class[a=1][b=2].class:not(1) {
color: red;
}
}
+ at keyframes some-name {
+ property: value;
+}
+ at supports (animation-name: test) {
+ @keyframes some-name {
+ property: value;
+ }
+ .selector {
+ color: red;
+ }
+}
diff --git a/test/less/import-reference.less b/test/less/import-reference.less
index 93160ab..97a628c 100644
--- a/test/less/import-reference.less
+++ b/test/less/import-reference.less
@@ -18,4 +18,6 @@
}
.class:extend(.class all) {
-}
\ No newline at end of file
+}
+
+.mixin-with-directives(some-name);
\ No newline at end of file
diff --git a/test/less/import/import-reference.less b/test/less/import/import-reference.less
index c77f692..33be5dc 100644
--- a/test/less/import/import-reference.less
+++ b/test/less/import/import-reference.less
@@ -48,4 +48,19 @@
@media (max-size: @max-size) {
color: red;
}
+}
+.mixin-with-directives(@keyframeName) {
+ @keyframes @keyframeName {
+ @rules1();
+ }
+ @supports (animation-name: test) {
+ @keyframes @keyframeName {
+ @rules2();
+ }
+ .selector {
+ color: red;
+ }
+ }
+ @rules1: {property: value;};
+ @rules2: {property: value;};
}
\ No newline at end of file
--
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