mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
Arbitrary (non-falsey) values returned from functions are cast as Anonymous nodes
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
saturate-filter: saturate(5%);
|
||||
contrast-white: #000000;
|
||||
contrast-black: #ffffff;
|
||||
contrast-red: #000000;
|
||||
contrast-red: #ffffff;
|
||||
contrast-green: #000000;
|
||||
contrast-blue: #ffffff;
|
||||
contrast-yellow: #000000;
|
||||
@@ -49,11 +49,11 @@
|
||||
contrast-light-thresh: #111111;
|
||||
contrast-dark-thresh: #eeeeee;
|
||||
contrast-high-thresh: #eeeeee;
|
||||
contrast-low-thresh: #eeeeee;
|
||||
contrast-low-thresh: #111111;
|
||||
contrast-light-thresh-per: #111111;
|
||||
contrast-dark-thresh-per: #eeeeee;
|
||||
contrast-high-thresh-per: #eeeeee;
|
||||
contrast-low-thresh-per: #eeeeee;
|
||||
contrast-low-thresh-per: #111111;
|
||||
replace: "Hello, World!";
|
||||
replace-captured: "This is a new string.";
|
||||
replace-with-flags: "2 + 2 = 4";
|
||||
|
||||
@@ -50,4 +50,7 @@
|
||||
val1: foo;
|
||||
val2: foo;
|
||||
}
|
||||
.test-simple {
|
||||
value: 3.141592653589793;
|
||||
}
|
||||
@arbitrary value after ();
|
||||
|
||||
@@ -91,6 +91,10 @@
|
||||
test-collapse();
|
||||
val2: foo;
|
||||
}
|
||||
.test-simple {
|
||||
@plugin "./plugin/plugin-simple";
|
||||
value: pi();
|
||||
}
|
||||
|
||||
test-atrule("@charset"; '"utf-8"');
|
||||
test-atrule("@arbitrary"; "value after ()");
|
||||
|
||||
3
test/less/plugin/plugin-simple.js
Normal file
3
test/less/plugin/plugin-simple.js
Normal file
@@ -0,0 +1,3 @@
|
||||
functions.add('pi', function() {
|
||||
return Math.PI;
|
||||
});
|
||||
Reference in New Issue
Block a user