Skip to content

Instantly share code, notes, and snippets.

Created March 16, 2014 21:38
What would you like to do?
Example of using property name interpolation in Less.
.mySelector {
.remSize(font-size, 1.2);
.remSize(@property; @sizeValue) {
@remValue: @sizeValue;
@pxValue: round((@sizeValue * unit(@fontSizeStandard)));
@{property}: ~"@{pxValue}px";
@{property}: ~"@{remValue}rem";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment