Skip to content

Instantly share code, notes, and snippets.

@cloudhead
Created May 11, 2011 19:38
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cloudhead/967157 to your computer and use it in GitHub Desktop.
Save cloudhead/967157 to your computer and use it in GitHub Desktop.
LESS v1.1.0 - What's new

LESS v1.1.0 - What's new

  • @arguments special variable. (.box-shadow () { -webkit-box-shadow: @arguments })
  • string interpolation ("@{var}" replaced with value of @var)
  • variable variables. (@@var refers to variable named by the value of @var)
  • JavaScript expressions. (``content: `"@{var}".toUpperCase() + '!'```)
  • Native string escaping. (~"MS.BS.DXImageTransform:filter()" instead of e() function)

... and a bunch of fixes.

See examples and full documentation on http://lesscss.org

@guillaume86
Copy link

cool ideas :)

@Heilemann
Copy link

I'm not sure I understand how string interpolation works; aside from being able to use a var flush with other text without it interferring, what does it actually do?

@guillaume86
Copy link

exactly what you say but it's very nice, allows a clean syntax compared to what you had to do before

@mishunov
Copy link

@arguments is awesome. Now, I can finally build sane mixins for CSS3 shadows with multiple arguments support. THANK YOU!

@cloudhead
Copy link
Author

@Heilemann: that's exactly what it does, it's just like #@var in ruby and${var}in bash. So it'll probably mainly be used inside urls, likeurl("http://@{base}/image.jpg")`, but combined with string escaping, can be used anywhere:

 @green: "FF";
  color: ~"#AA@{green}EE";

output:

   color: #AAFFEE;

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