public
Last active

LESS v1.1.0 - What's new

  • Download Gist
gistfile1.md
Markdown

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

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?

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

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

@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;

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.