Created
March 25, 2015 09:49
-
-
Save spartDev/fdca74cd6975250ebe9d 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 class="button button-default">Default</button> | |
<button class="button button-success">Success</button> | |
<button class="button button-warning">Warning</button> | |
<button class="button button-info">Info</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.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
// Configuration | |
$btn-name: 'button'; | |
$btn-color: ( | |
default: #7f8c8d, | |
success: #27ae60, | |
danger: #c0392b, | |
warning: #f1c40f, | |
info: #2980b9 | |
) !default; | |
.#{$btn-name} { | |
display: inline-block; | |
vertical-align: middle; | |
font: inherit; | |
cursor: pointer; | |
border: 0; | |
background: transparent; | |
outline: none; | |
padding: .5em; | |
margin-bottom: 1em; | |
color: #fff; | |
transition: background .15s; | |
box-shadow: inset 0 1px rgba(255, 255, 255, .2); | |
border-radius: .15em; | |
} | |
@each $key, $value in $btn-color { | |
.button-#{$key} { | |
background: $value; | |
&:hover { | |
background: darken($value, 10%); | |
} | |
} | |
} | |
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 { | |
display: inline-block; | |
vertical-align: middle; | |
font: inherit; | |
cursor: pointer; | |
border: 0; | |
background: transparent; | |
outline: none; | |
padding: .5em; | |
margin-bottom: 1em; | |
color: #fff; | |
transition: background .15s; | |
box-shadow: inset 0 1px rgba(255, 255, 255, 0.2); | |
border-radius: .15em; | |
} | |
.button-default { | |
background: #7f8c8d; | |
} | |
.button-default:hover { | |
background: #667273; | |
} | |
.button-success { | |
background: #27ae60; | |
} | |
.button-success:hover { | |
background: #1e8449; | |
} | |
.button-danger { | |
background: #c0392b; | |
} | |
.button-danger:hover { | |
background: #962d22; | |
} | |
.button-warning { | |
background: #f1c40f; | |
} | |
.button-warning:hover { | |
background: #c29d0b; | |
} | |
.button-info { | |
background: #2980b9; | |
} | |
.button-info:hover { | |
background: #20638f; | |
} |
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 class="button button-default">Default</button> | |
<button class="button button-success">Success</button> | |
<button class="button button-warning">Warning</button> | |
<button class="button button-info">Info</button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment