-
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
Idea: loop support #869
Comments
like SCSS |
As far as I know, @cloudhead is firmly against it, since it's not declarative. I'm not personally an authority of what a declarative language is or isn't, but as far as I understand, it's basically sets of straightforward declarations. THIS property is THAT value. XML is declarative. Both CSS and LESS are declarative, making them close cousins. However, SCSS is not. It's more like a scripting language (like VBScript), mimicking the syntax of CSS. By making LESS declarative, it's essentially CSS+. It's CSS with more values, variables, and guards. It's intended as an "extension" as CSS. In contrast, SCSS has evolved as a programming language with the syntax of CSS, blending some scripting with some declarations, making it overall a tad schizophrenic. It also makes it more powerful, but can be more challenging to master as a result. So the long and short: I don't see this happening. |
do you mean you dont want to do this ? i thing its very very useful feature. you can add some new feature like this and be a best solution for modern css if is there any way to write plugin or addon for less. |
My goal is not to convince you. You're welcome to have any opinion you wish on what's useful. :-) You asked if this would be supported in LESS, and my answer is that likely, it will not be, but it's also not up to me. As far as a plugin, it's an interesting idea. Nothing like that exists, currently. However, you could download / fork LESS and make any modifications to the source code you like for your own project. |
looping is unofficially supported. just call the mixin recursively and use guards e.g. (from twitter bootstrap)
|
@agatronic nice idea tanx |
@MatthewDL tank you very much. |
All documentation for LESS is on http://lesscss.org/ Thanks @agatronic. I figured there was a way but couldn't think of it offhand. Maybe we should add a LESS design patterns wiki. |
what is your idea about supporting looping (while, for, do) in less
something like this for create a grid system
and compiled to
is there any way to write plugin or addon for less ?
The text was updated successfully, but these errors were encountered: