Skip to content

Instantly share code, notes, and snippets.

@andrewrocco
Created March 8, 2012 15:22
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andrewrocco/2001481 to your computer and use it in GitHub Desktop.
Save andrewrocco/2001481 to your computer and use it in GitHub Desktop.
Helpful Sass Mixins
@mixin border-radius ( $value: 3px ) {
-webkit-border-radius: $value;
-moz-border-radius: $value;
border-radius: $value;
// keeps background from busting out of border
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
}
@mixin box-shadow( $horiz : .5em , $vert : .5em , $blur : 0px , $spread : 0px , $color : #000000 ){
-webkit-box-shadow: $horiz $vert $blur $spread $color;
-moz-box-shadow: $horiz $vert $blur $spread $color;
box-shadow: $horiz $vert $blur $spread $color;
}
@mixin facit {
font-family: “facitweb”, Verdana, Arial, sans-serif;
}
@mixin font-size( $value: 12 ) {
font-size: value + px;
font − size: (value / 10) + rem;
}
@mixin hide-text {
font: 0/0 a;
text-shadow: none;
color: transparent;
}
@mixin opacity ( $value: 0.5 ) {
opacity: $value;
-ms-filter: “progid:DXImageTransform.Microsoft.Alpha(Opacity=” $value * 100 “)”;
filter: alpha(opacity= $value * 100 );
zoom: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment