Created
June 5, 2011 21:53
-
-
Save victorbstan/1009471 to your computer and use it in GitHub Desktop.
Neat Notification SASS mixin for rouded corners and soft drop-shaddows
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
$default_rounded_amount: 5px | |
// Round corner at position by amount. | |
@mixin round-corner($position, $amount: $default_rounded_amount) | |
border-#{$position}-radius: $amount | |
-webkit-border-#{$position}-radius: $amount | |
@mixin round-corner-mozilla($position, $amount: $default_rounded_amount) | |
-moz-border-radius-#{$position}: $amount | |
// Round left corners by amount | |
@mixin round-left-corners($amount: $default_rounded_amount) | |
@include round-corner("top-left", $amount) | |
@include round-corner("bottom-left", $amount) | |
@include round-corner-mozilla("topleft", $amount) | |
@include round-corner-mozilla("bottomleft", $amount) | |
// Round right corners by amount | |
@mixin round-right-corners($amount: $default_rounded_amount) | |
@include round-corner("top-right", $amount) | |
@include round-corner("bottom-right", $amount) | |
@include round-corner-mozilla("topright", $amount) | |
@include round-corner-mozilla("bottomright", $amount) | |
// Round top corners by amount | |
@mixin round-top-corners($amount: 5px) | |
@include round-corner("top-left", $amount) | |
@include round-corner("top-right", $amount) | |
@include round-corner-mozilla("topleft", $amount) | |
@include round-corner-mozilla("topright", $amount) | |
// Round bottom corners by amount | |
@mixin round-bottom-corners($amount: $default_rounded_amount) | |
@include round-corner("bottom-left", $amount) | |
@include round-corner("bottom-right", $amount) | |
@include round-corner-mozilla("bottomleft", $amount) | |
@include round-corner-mozilla("bottomright", $amount) | |
// Round all corners by amount | |
@mixin round-corners($amount: $default_rounded_amount) | |
border-radius: $amount | |
-moz-border-radius: $amount | |
-webkit-border-radius: $amount | |
@mixin glow-disk($color: white) | |
-moz-box-shadow: 0 0 10px $color | |
box-shadow: 0 0 20px $color | |
-webkit-box-shadow: 0 0 40px $color | |
// Use mixins: | |
// @include round-corners |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment