Menu

gitpiper

Less.js Cheat Sheet in April 2024

Last Updated: 5 April 2024

README.md

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') { }

338+ more cheat sheets for you in April 2024

Subscribe to our Newsletter

Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️

© 2024 GitPiper. All rights reserved

Rackpiper Technology Inc

Company

About UsBlogContact

Subscribe to our Newsletter

Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️