-
-
Save BumbuKhan/9e4d51c19bff09dad8c3f3b5e4b67758 to your computer and use it in GitHub Desktop.
Border radius @mixin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin border-radius-partial($radius, $part:null) { | |
@if ($part) { | |
-webkit-border-#{$part}-radius: $radius; | |
-moz-border-#{$part}-radius: $radius; | |
-ms-border-#{$part}-radius: $radius; | |
border-#{$part}-radius: $radius; | |
} | |
@else { | |
-webkit-border-radius: $radius; | |
-moz-border-radius: $radius; | |
-ms-border-radius: $radius; | |
border-radius: $radius; | |
} | |
} | |
@mixin border-radius($radius, $top-right:null, $bottom-right:null, $bottom-left:null, $top-left:null) { | |
@if ($top-right or $bottom-right or $bottom-left or $top-left) { | |
@if ($top-right) { | |
@include border-radius-partial($radius, 'top-right'); | |
} | |
@if ($bottom-right) { | |
@include border-radius-partial($radius, 'bottom-right'); | |
} | |
@if ($bottom-left) { | |
@include border-radius-partial($radius, 'bottom-left'); | |
} | |
@if ($top-left) { | |
@include border-radius-partial($radius, 'top-left'); | |
} | |
} | |
@else { | |
@include border-radius-partial($radius); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment