Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added px-to-em function from Neat

  • Loading branch information...
commit 8054028b9835c7d945007e3bf6149f7b7e11c73c 1 parent c38ba2d
Kyle Fiedler authored
1  app/assets/stylesheets/_bourbon.scss
View
@@ -5,6 +5,7 @@
@import "functions/grid-width";
@import "functions/linear-gradient";
@import "functions/modular-scale";
+@import "functions/px-to-em";
@import "functions/radial-gradient";
@import "functions/render-gradients";
@import "functions/tint-shade";
8 app/assets/stylesheets/functions/_px-to-em.scss
View
@@ -0,0 +1,8 @@
+// Convert pixels to ems
+// eg. for a relational value of 12px write em(12) when the parent is 16px
+// if the parent is another value say 24px write em(12, 24)
+
+@function em($pxval, $base: 16) {
+ @return ($pxval / $base) * 1em;
+}
+
Please sign in to comment.
Something went wrong with that request. Please try again.