Created
November 25, 2012 00:57
-
-
Save cbfrance/4141969 to your computer and use it in GitHub Desktop.
Notification mixin
This file contains hidden or 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
// Notification banner with dynamic color size and vertical baseline | |
// | |
// $color - used to dynamically set background, borders, font color. | |
// $adjustment - tweak the adjustment of the hues | |
// $font-size - adjust the size of the notification | |
@mixin notification($color: $light-gray, $adjustment: "lighten", $font-size: $medium-font-size) { | |
margin: 0; | |
padding-left: rhythm(1/2, $font-size); | |
padding-right: rhythm(1/2, $font-size); | |
margin-top: rhythm(1, $font-size); | |
margin-bottom: rhythm(1, $font-size); | |
color: adjust_hue(darken($color, 50%), -5%); | |
@include leading-border(1px, 1, $font-size); | |
@include trailing-border(1px, 1, $font-size); | |
border-color: adjust_hue(darken($color, 20%), -5%); | |
@if $adjustment == "lighten" { | |
background: adjust_hue(lighten($color, 20%), -5%); | |
} | |
@else if $adjustment == "darken" { | |
background: adjust_hue(darken($color, 20%), -5%); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment