-
-
Save teolopez/7543136 to your computer and use it in GitHub Desktop.
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
// Opacity should be on a 100 point scale (0-100 instead of 0.0-1.0) | |
// This should be used to supplement a normal border definition as it | |
// only deals with the 'border-color' property. | |
@mixin border-opacity($color, $opacity) { | |
$opacity: $opacity / 100; | |
// Unsupporting browsers get this | |
border-color: $color; | |
// Browsers that support RGBA will get this instead | |
border-color: rgba($color, $opacity); | |
// Prevent the element's background from reaching the edge of the border | |
-moz-background-clip: padding; | |
-webkit-background-clip: padding; | |
background-clip: padding-box; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment