Created
March 30, 2016 14:47
-
-
Save fotan/bd8a4eb7748d811c257857b09574a8be to your computer and use it in GitHub Desktop.
SCSS - Corner Radiuses
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
/// Separated border-radius helpers | |
/// @access public | |
/// @param {Length} $top-left-radius - Top left radius | |
/// @param {Length} $top-right-radius - Top right radius | |
/// @param {Length} $bottom-right-radius - Bottom right radius | |
/// @param {Length} $bottom-left-radius - Bottom left radius | |
/// @example scss - Usage | |
/// .foo { | |
/// @include border-radius-separate(1px, 2px, 3px, 4px); | |
/// } | |
/// @example css - Result | |
/// .foo { | |
/// -webkit-border-top-left-radius: 1px; | |
/// -moz-border-top-left-radius: 1px; | |
/// border-top-left-radius: 1px; | |
/// -webkit-border-top-right-radius: 2px; | |
/// -moz-border-top-right-radius: 2px; | |
/// border-top-right-radius: 2px; | |
/// -webkit-border-bottom-right-radius: 3px; | |
/// -moz-border-bottom-right-radius: 3px; | |
/// border-bottom-right-radius: 3px; | |
/// -webkit-border-bottom-left-radius: 4px; | |
/// -moz-border-bottom-left-radius: 4px; | |
/// border-bottom-left-radius: 4px; | |
/// } | |
@mixin border-radius-separate($top-left-radius, $top-right-radius, $bottom-right-radius, $bottom-left-radius) { | |
@include prefix(border-top-left-radius, $top-left-radius, 'webkit' 'moz'); | |
@include prefix(border-top-right-radius, $top-right-radius, 'webkit' 'moz'); | |
@include prefix(border-bottom-right-radius, $bottom-right-radius, 'webkit' 'moz'); | |
@include prefix(border-bottom-left-radius, $bottom-left-radius, 'webkit' 'moz'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment