Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contrast() now accepts percentage threshold #523

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

atkaye
Copy link

@atkaye atkaye commented Dec 21, 2013

Fixes #501

@leafo
Copy link
Owner

leafo commented Dec 21, 2013

spec? 😃

@atkaye
Copy link
Author

atkaye commented Dec 21, 2013

@threshold as percentage string rather than just decimal as per http://lesscss.org/#reference:
contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);

Sound good?

@leafo
Copy link
Owner

leafo commented Dec 21, 2013

Sorry I meant adding a test to here: https://github.com/leafo/lessphp/blob/master/tests/inputs/colors.less

Edit: updated with correct file

@atkaye
Copy link
Author

atkaye commented Dec 21, 2013

Got ya... added tests as above

@atkaye
Copy link
Author

atkaye commented Dec 26, 2013

Nudge 😄

@jonmilsom
Copy link

This looks really useful... @leafo please can you merge?

@glensc
Copy link
Contributor

glensc commented Aug 17, 2017

@Krinkle
Copy link
Collaborator

Krinkle commented Oct 16, 2018

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.

Krinkle pushed a commit that referenced this pull request Oct 16, 2018
@Krinkle
Copy link
Collaborator

Krinkle commented Oct 16, 2018

I've published a rebased version to a pull-523 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

contrast not working for threshold percentage strings between 0 - 100
5 participants