Last active
August 29, 2015 14:11
-
-
Save thealscott/5773030249dbe23ccd04 to your computer and use it in GitHub Desktop.
SASS mixin for prefixing calc()
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
@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