Skip to content

Instantly share code, notes, and snippets.

@renekoch
Created April 10, 2013 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renekoch/5354408 to your computer and use it in GitHub Desktop.
Save renekoch/5354408 to your computer and use it in GitHub Desktop.
Sass file for rounded-cormers
@mixin round-corner($vert, $horz, $radius: 4px) {
-webkit-border-#{$vert}-#{$horz}-radius: $radius;
-moz-border-radius-#{$vert}#{$horz}: $radius;
border-#{$vert}-#{$horz}-radius: $radius;
}
@mixin rounded-corners($radius:4px){
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-o-border-radius: $radius;
border-radius: $radius;
}
@mixin rounded-corners-top($radius: 4px){
@include round-corner(top, left, $radius);
@include round-corner(top, right, $radius);
}
@mixin rounded-corners-bottom($radius:4px){
@include round-corner(bottom, left, $radius);
@include round-corner(bottom, right, $radius);
}
@mixin rounded-corners-right($radius:4px){
@include round-corner(top, right, $radius);
@include round-corner(bottom, right, $radius);
}
@mixin rounded-corners-left($radius:4px){
@include round-corner(top, left, $radius);
@include round-corner(bottom, left, $radius);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment