This is Devhints.io cheatsheets — a collection of cheatsheets I've written.

# Less.js

### Functions

    unit(30px / 5px)  #=> 6
    unit(5, px)       #=> 5px

    e("ms:stuff()")   #=> ms:stuff() (unquote)

    %("count: %d", 1+2) #=> "count: 3"

    iscolor(@x)
    isstring(@x)
    isnumber(@x)
    iskeyword(@x)
    isurl(url(...))
    ispixel()
    isem()
    ispercentage()
    isunit()

    hue(@color)
    saturation(@color)
    lightness(@color)
    luma(@color)
    luminance(@color)

    fade(@color, amount)
    fadein(@color, amount)
    fadeout(@color, amount)
    spin(@color, degrees)
    mix(@a, @b, amount)

### Conditionals

    .image when (luma(@color) > 50%) { }
    .image when (not(...)) { }
    .image when (default()) {}
    .image when (e(@shape) = 'circle') { }

Devhints.io cheatsheets is a collection of cheatsheets I've written over the years. Suggestions and corrections? Send them in. I'm Rico Sta. Cruz. Check out my Today I learned blog for more.