Created
July 21, 2012 14:37
-
-
Save sergej-brazdeikis/3155973 to your computer and use it in GitHub Desktop.
Less.js variables inside CSS property
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example how to use variable inside of CSS property name | |
.pv(@p,@v) | |
{ | |
-:~`";@{p}:@{v}".replace(/'/g,"")`; | |
} | |
#container { | |
.pv('border-radius',10px); | |
} | |
/* | |
* Output: | |
* #container { | |
* -: ;border-radius:10px; | |
* } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment