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

Add predefined @version variable #1947

Open
lee-elenbaas opened this issue Apr 2, 2014 · 6 comments
Open

Add predefined @version variable #1947

lee-elenbaas opened this issue Apr 2, 2014 · 6 comments

Comments

@lee-elenbaas
Copy link

Add a predefined variable with the version number in some form as its predefined value
Currently when using less with an external tool - there is absolutely no way to extract what version is used
Such a variable will allow me to place it in the development/debug environment into some content file in order to find out what the less version is

@seven-phases-max
Copy link
Member

A built-in function (version) would be better than "special" variable. (More easy to implement, less burden for the compiler and more safe / backward-compatible).

@lee-elenbaas
Copy link
Author

function is great - it will be more LESS specific than a value as well

@zamtools
Copy link

zamtools commented Apr 3, 2014

I considered trying to write this function but quickly discovered, while browsing the source, that the less.version attribute doesn't appear to be accessible from the less.tree attribute. It would seem that tree would need to be made aware of the version or its parent less object in order to access it.

@lukeapage
Copy link
Member

I think it will be alot easier on the 2.0.0 branch - feel free to make a pull request against that branch.

I've switched to using more structured requires so passing in dependencies is easier.

@kevinramharak
Copy link

Is this issue still up for grabs? I seems really dated, but the issue has not been closed yet.

@mkurz
Copy link

mkurz commented May 8, 2024

Is it somehow possible to render the less version that was used to compile the css file into a comment of that css file?

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

No branches or pull requests

6 participants