Skip to content

Instantly share code, notes, and snippets.

@jmmcduffie
Created November 18, 2013 22:56
Show Gist options
  • Save jmmcduffie/7536894 to your computer and use it in GitHub Desktop.
Save jmmcduffie/7536894 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
@mixin calc($property, $value, $fallback) {
#{$property}: $fallback;
#{$property}: -webkit-calc(#{$value});
#{$property}: calc(#{$value});
}
body {
@include calc(width, "100% - 20px", 98%);
}
body {
width: 98%;
width: -webkit-calc(100% - 20px);
width: calc(100% - 20px);
}
@BuddyLReno
Copy link

Great mixin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment