Skip to content

Instantly share code, notes, and snippets.

@mmcc
Created August 30, 2012 19:05
Show Gist options
  • Save mmcc/3537807 to your computer and use it in GitHub Desktop.
Save mmcc/3537807 to your computer and use it in GitHub Desktop.
Common Sass mixins I use.
// Mixins
@mixin hover-ease($element, $time) {
-moz-transition: $element $time + s ease;
-o-transition: $element $time + s ease;
-webkit-transition: $element $time + s ease;
-ms-transition: $element $time + s ease;
}
@mixin corners($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
border-radius: $radius;
}
@mixin glow($position, $color, $opacity) {
box-shadow: $position rgba($color, $opacity);
}
// Not really a mixin, but close enough. To use: @extend .clearfix
.clearfix {
zoom:1;
&:before, &:after {
content: "\0020";
display: block;
height: 0;
overflow: hidden;
}
&:after {
clear: both;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment