Created
June 19, 2014 14:06
-
-
Save kianoshp/fb46fe3130420c9c8f0a to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
<button>default</button> | |
<button class="secondary-button">secondary</button> |
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
// ---- | |
// Sass (v3.3.8) | |
// Compass (v1.0.0.alpha.19) | |
// ---- | |
@function set-font-color($background-color, $default-font-color) { | |
$font-color: $default-font-color; | |
@if lightness($background-color) > 50% { | |
$font-color: invert($default-font-color); | |
} | |
@return $font-color; | |
} | |
@function sfc($background-color, $default-font-color) { | |
@return set-font-color($background-color, $default-font-color); | |
} | |
$white: #fff !default; | |
$gray: #444 !default; | |
$light-gray: lighten($gray, 13.5%) !default; //#666 | |
$lighter-gray: lighten($gray, 33.5%) !default; //#999 | |
$lighterer-gray: lighten($gray, 40.5%) !default; //#ababab | |
$lightest-gray: lighten($gray, 60%) !default; //#ddd | |
$off-white: darken($white, 4.75%); //#f3f3f3 | |
$blue: #002868 !default; | |
$button-default-bg-color: $blue !global; | |
$button-default-font-color: $off-white; | |
button { | |
width: auto; | |
min-width: 100px; | |
height: 30px; | |
text-align: center; | |
font-size: 0.75em; | |
line-height: 1; | |
margin: 10px; | |
display: inline-block; | |
position: relative; | |
background-color: $button-default-bg-color; | |
color: sfc($button-default-bg-color, $button-default-font-color); | |
} | |
.secondary-button { | |
background-color: $lighter-gray; | |
color: sfc($lighter-gray, $button-default-font-color); | |
} |
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
button { | |
width: auto; | |
min-width: 100px; | |
height: 30px; | |
text-align: center; | |
font-size: 0.75em; | |
line-height: 1; | |
margin: 10px; | |
display: inline-block; | |
position: relative; | |
background-color: #002868; | |
color: #f3f3f3; | |
} | |
.secondary-button { | |
background-color: #999999; | |
color: #0c0c0c; | |
} |
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
<button>default</button> | |
<button class="secondary-button">secondary</button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment