Last active
February 6, 2016 03:09
-
-
Save seven-phases-max/97611099ba7e434626ab to your computer and use it in GitHub Desktop.
This file contains 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
@import "for.less"; | |
usage { | |
.pixels-to-rems(padding, 10 0 20 10); | |
} | |
// impl: | |
@base-font-size: 10px; | |
.pixels-to-rems(@p, @vs) { | |
.for(@vs); .-each(@v) { | |
@{p}+_: 1px * @v; | |
@{p}@{-}+_: 1rem * @v / @base-font-size; | |
} | |
@-: ~" "; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment