-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Is this "& when" use case a bug? #1871
Comments
Example 1 is #1750 (I think it was fixed in 1.6.2).
|
also although I realise its just a test case, did you realise your first example can be written in a much simpler way..
and closing as duplicate |
Ah okay, I should have double-checked if it was addressed already in a Less update. @lukeapage Yes, but as it's a reduced case, there's more that I was intending on putting in the |
there is an open issue for the 2nd one. #921 |
I've just started experimenting with "& when" to do inline "if" style blocks. However, I can't get them to actually work (EDIT: I got them to work, sort of, but not as I want or expected them to work). I'm not certain if it's my use case or it's just now how they're currently designed.
Reduced test case:
Error: Name error: variable @var is undefined
I thought that perhaps this was triggering a bug within a mixin (even though I regularly use & directly inside a mixin) so I reduced it further:
Same error. However, I finally noticed that if I removed
#test > .start
in the reduced case, it output, so it seems like it's a variable scoping bug. Why does it cause a problem in the first mixin? A defined variable in the mixin should be available to a guard, should it not?The text was updated successfully, but these errors were encountered: