lessphp
lessphp copied to clipboard
contrast() now accepts percentage threshold
Fixes leafo/lessphp#501
spec? :smiley:
@threshold as percentage string rather than just decimal as per http://lesscss.org/#reference:
contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);
Sound good?
Sorry I meant adding a test to here: https://github.com/leafo/lessphp/blob/master/tests/inputs/colors.less
Edit: updated with correct file
Got ya... added tests as above
Nudge :smile:
This looks really useful... @leafo please can you merge?
added in https://github.com/MarcusSchwarz/lesserphp/releases/tag/v0.5.1
It seems the tests are not passing correctly:
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
color3: #ffffff;
- color4: #000000;
- color5: #000000;
+ color4: #ffffff;
+ color5: #ffffff;
}
I've confirmed with less.js that the way the test was written, has the correct 'Expected' value. But the currently produced 'Actual' isn't as it should be.
I've published a rebased version to a pull-523 branch.