Skip to content

Instantly share code, notes, and snippets.

@ocean90
Created January 2, 2012 09:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ocean90/1549988 to your computer and use it in GitHub Desktop.
Save ocean90/1549988 to your computer and use it in GitHub Desktop.
Custom border radius mixin for Compass
// Custom Border Radius
@mixin _border-radius($radius: 5px, $vertical-radius: false) {
@if $vertical-radius {
// Webkit doesn't understand the official shorthand syntax for specifying
// a vertical radius unless so in case there's several we only take the first.
@include experimental(border-radius, first-value-of($radius) first-value-of($vertical-radius),
not -moz,
-webkit,
not -o,
not -ms,
not -khtml,
not official
);
@include experimental(border-radius, $radius unquote("/") $vertical-radius,
-moz,
not -webkit,
not -o,
not -ms,
not -khtml,
official
);
} @else {
@include experimental(border-radius, $radius,
-moz,
-webkit,
not -o,
not -ms,
not -khtml,
official
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment