-
Notifications
You must be signed in to change notification settings - Fork 3
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
Recursive functions not working #2
Comments
In fact, they are. I found out now that the piece of code that's triggering the error is: .border-radius(@radius: 10px)
{
.border-radius(@radius, @radius);
} But it's not all the code that is problematic. It's just the default value! If I change this code to remove the "10px", it works! |
In fact, I'll leave this issue opened, because while less.js don't accept this default value on recursive mixin, I guess there shouldn't be a default value on css3.less file. |
Thanks for opening the issue tyron, i'll commit a fix to the master branch this week |
Just to make sure... Is there any problem with the definition in the mixin or this is indeed a problem with less.js? I didn't open a ticket with them, but I believe that should be done.... |
I'm not sure whether its a bug in their end or an intentional change that I'll need to incorporate... from my testing just then its not working in dotless css either, so it seems whatever has been changed has been mimicked in that library too. To be fair though, default values are probably not needed for the overloads functions (my bad), you cant call the .border-radius(val, val) or .border-radius(val, val, val, val) functions without specifying all the parameters anyways (if you leave it null and just call .border-radius; from your stylesheet it calls the base .border-radius(val) function), and it seems to be cascading down ok for that. So I might just remove the parameters all together from the 2 and 4 value functions and it should fix the issue. |
I'm trying to use a border-radius like:
But this triggers an error:
Cannot call method 'slice' of undefined
I found out that removing the overloaded functions (with one and two parameters), the code works fine. I don't know wheter this should be reported here or in less.js repo, though.
The text was updated successfully, but these errors were encountered: