Skip to content

Instantly share code, notes, and snippets.

@feifanzhou
Last active August 29, 2015 14:01
Show Gist options
  • Save feifanzhou/ea7f35a2899646c686c4 to your computer and use it in GitHub Desktop.
Save feifanzhou/ea7f35a2899646c686c4 to your computer and use it in GitHub Desktop.
Vendor prefix SASS mixin
@mixin vendor-prefix($name, $argument) {
#{$name}: #{ $argument };
-webkit-#{$name}: #{ $argument };
-ms-#{$name}: #{ $argument };
-moz-#{$name}: #{ $argument };
-o-#{$name}: #{ $argument };
}
@feifanzhou
Copy link
Author

Example usage:

@include vendor-prefix(border-radius, 4px);
@include vendor-prefix(transition, 'width 0.25s');  // Note the quotes for multi-word arguments

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