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

Accessing Namespaced Variables and Attributes #564

Closed
alixaxel opened this issue Jan 11, 2012 · 3 comments
Closed

Accessing Namespaced Variables and Attributes #564

alixaxel opened this issue Jan 11, 2012 · 3 comments

Comments

@alixaxel
Copy link

Both the website documentation and this (http://coding.smashingmagazine.com/2010/12/06/using-the-less-css-preprocessor-for-smarter-style-sheets/) Smashing Magazine article state that LESS variables can be declared and accessed inside namespaces, however no matter what I try I can't recreate the 5th example of the SM post.

This would be so useful to me, for instance line-height: @size * body['line-height'] / body['font-size']; would allow me to speed up the vertical rhythm calculations in my LESS declarations - but I always get syntax errors. :-(

So, what is the status on this feature? Was it bogus? Will it be implemented? Or something else..?

@alixaxel
Copy link
Author

Oh, no! #6

@alixaxel alixaxel mentioned this issue Jan 11, 2012
@cloudhead
Copy link
Member

Yea, just store the value in a variable, then you can re-use it where you want.

@alixaxel
Copy link
Author

@cloudhead: Yes, I'll have to resort to that - it would be nice to have accessors though, to reduce the variable pollution.

I assume the lack of accessors affects both the attribute values and namespaced variables, right?

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

No branches or pull requests

2 participants