Skip to content

Instantly share code, notes, and snippets.

@thealscott
Last active August 29, 2015 14:11
Show Gist options
  • Save thealscott/5773030249dbe23ccd04 to your computer and use it in GitHub Desktop.
Save thealscott/5773030249dbe23ccd04 to your computer and use it in GitHub Desktop.
SASS mixin for prefixing calc()
@mixin calc($property, $operation) {
#{$property}: -webkit-calc(#{$operation});
#{$property}: -moz-calc(#{$operation});
#{$property}: calc(#{$operation});
}
// Make sure to pass your operation as a string, or else it will cause compile errors as SASS will try and evaluate it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment