Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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