Created
January 6, 2012 18:16
-
-
Save charlesmartucci/1571741 to your computer and use it in GitHub Desktop.
Button Classes
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
/*BUTTONS */ | |
/* button */ | |
.btn | |
{ | |
padding: 0 10px; | |
height: 28px; | |
background: #ffffff; /* Old browsers */ | |
background: -moz-linear-gradient(top, #ffffff 0%, #ffffff 49%, #fcfcfc 51%, #fafafa 100%); /* FF3.6+ */ | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(49%,#ffffff), color-stop(51%,#fcfcfc), color-stop(100%,#fafafa)); /* Chrome,Safari4+ */ | |
background: -webkit-linear-gradient(top, #ffffff 0%,#ffffff 49%,#fcfcfc 51%,#fafafa 100%); /* Chrome10+,Safari5.1+ */ | |
background: -o-linear-gradient(top, #ffffff 0%,#ffffff 49%,#fcfcfc 51%,#fafafa 100%); /* Opera 11.10+ */ | |
background: -ms-linear-gradient(top, #ffffff 0%,#ffffff 49%,#fcfcfc 51%,#fafafa 100%); /* IE10+ */ | |
background: linear-gradient(top, #ffffff 0%,#ffffff 49%,#fcfcfc 51%,#fafafa 100%); /* W3C */ | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fafafa',GradientType=0 ); /* IE6-9 */ | |
display: inline-block; | |
border: 1px solid rgba(0, 0, 0, 0.25); | |
border-radius: 5px; | |
-moz-border-radius: 5px; | |
-webkit-border-radius: 5px; | |
/* box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.2); | |
-moz-box-shadow: 0px 1px 0 rgba(0, 0, 0, 0.2); | |
-webkit-box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.2); */ | |
cursor: pointer; | |
line-height: 28px; | |
text-decoration: none; | |
text-shadow: 0 1px rgba(255,255,255,.5); | |
font-weight:bold; | |
} | |
/* hover */ | |
.btn:hover, .btn.primary:hover | |
{ | |
border: 1px solid rgba(0, 0, 0, 0.6); | |
text-decoration: none; | |
} | |
/* pressed state */ | |
.btn:active | |
{ | |
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4) inset; | |
-moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4) inset; | |
-webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4) inset; | |
} | |
/* primary button overrides */ | |
.btn.primary | |
{ | |
background: #0c7bb7; /* Old browsers */ | |
background: -moz-linear-gradient(top, #0c7bb7 0%, #0078ba 49%, #006aad 53%, #005d9d 100%); /* FF3.6+ */ | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#0c7bb7), color-stop(49%,#0078ba), color-stop(53%,#006aad), color-stop(100%,#005d9d)); /* Chrome,Safari4+ */ | |
background: -webkit-linear-gradient(top, #0c7bb7 0%,#0078ba 49%,#006aad 53%,#005d9d 100%); /* Chrome10+,Safari5.1+ */ | |
background: -o-linear-gradient(top, #0c7bb7 0%,#0078ba 49%,#006aad 53%,#005d9d 100%); /* Opera 11.10+ */ | |
background: -ms-linear-gradient(top, #0c7bb7 0%,#0078ba 49%,#006aad 53%,#005d9d 100%); /* IE10+ */ | |
background: linear-gradient(top, #0c7bb7 0%,#0078ba 49%,#006aad 53%,#005d9d 100%); /* W3C */ | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0c7bb7', endColorstr='#005d9d',GradientType=0 ); /* IE6-9 */ | |
color:#fff; | |
text-shadow:0 -1px 0 rgba(0,0,0,.4); | |
} | |
/* primary button hover overrides */ | |
.btn.primary:hover | |
{ | |
background: #0f9ae5; /* Old browsers */ | |
background: -moz-linear-gradient(top, #0f9ae5 0%, #0098ea 49%, #008ae0 53%, #007ed2 100%); /* FF3.6+ */ | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#0f9ae5), color-stop(49%,#0098ea), color-stop(53%,#008ae0), color-stop(100%,#007ed2)); /* Chrome,Safari4+ */ | |
background: -webkit-linear-gradient(top, #0f9ae5 0%,#0098ea 49%,#008ae0 53%,#007ed2 100%); /* Chrome10+,Safari5.1+ */ | |
background: -o-linear-gradient(top, #0f9ae5 0%,#0098ea 49%,#008ae0 53%,#007ed2 100%); /* Opera 11.10+ */ | |
background: -ms-linear-gradient(top, #0f9ae5 0%,#0098ea 49%,#008ae0 53%,#007ed2 100%); /* IE10+ */ | |
background: linear-gradient(top, #0f9ae5 0%,#0098ea 49%,#008ae0 53%,#007ed2 100%); /* W3C */ | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0f9ae5', endColorstr='#007ed2',GradientType=0 ); /* IE6-9 */ | |
} | |
/* button inactive */ | |
.btn.inactive, .btn.inactive:hover | |
{ | |
background-color: #fefefe; | |
border: 1px solid rgba(0, 0, 0, 0.1); | |
color: #999; | |
cursor: default; | |
} | |
/* this line-height change compensates for box-model applying differently to <a> tags vs input and button tags */ | |
button.btn, input.btn | |
{ | |
height: 30px; | |
color: #005d9d; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment