Skip to content

Instantly share code, notes, and snippets.

@dhigginbotham
Created June 25, 2014 03:07
Show Gist options
  • Save dhigginbotham/52b4b576b8fdd18046ba to your computer and use it in GitHub Desktop.
Save dhigginbotham/52b4b576b8fdd18046ba to your computer and use it in GitHub Desktop.
.button(@btn-color: @brand-primary, @text-color: @light) {
border: 1px solid darken(@btn-color, 13%);
border-top-color: darken(@btn-color, 7%);
border-left-color: darken(@btn-color, 7%);
padding: 4px 12px;
color: @text-color;
display: inline-block;
font-size: 11px;
font-weight: bold;
text-decoration: none;
text-shadow: 0 1px rgba(0,0,0, .75);
cursor: pointer;
margin-bottom: 20px;
line-height: 21px;
.transition();
.border-radius(4px);
.css-gradient(@btn-color,darken(@btn-color, 5%));
&:hover, &:focus {
color: @text-color;
border: 1px solid darken(@btn-color, 13%);
border-top-color: darken(@btn-color, 20%);
border-left-color: darken(@btn-color, 20%);
.css-gradient(darken(@btn-color, 5%),darken(@btn-color, 10%));
}
&:active {
text-shadow: 0 1px 0 darken(@text-color, 90%);
}
}
.button, .button:visited {
.button();
&.success {
.button(@brand-success);
}
&.warning {
.button(@brand-warning);
}
&.danger {
.button(@brand-danger);
}
&.info {
.button(@brand-info);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment