Skip to content

Instantly share code, notes, and snippets.

@itsjavi
Created March 21, 2014 10:42
Show Gist options
  • Select an option

  • Save itsjavi/9683572 to your computer and use it in GitHub Desktop.

Select an option

Save itsjavi/9683572 to your computer and use it in GitHub Desktop.
Push-style bootstrap 3 button factory
.btn-factory(@color, @textcolor:#ffffff){
font-weight:800;
background:@color;
color:@textcolor;
box-shadow: 0 3px 0 0 darken(@color, 10%);
&:hover{
background:@color;
color:@textcolor;
box-shadow: 0 3px 0 0 darken(@color, 10%);
text-decoration: none;
}
&:focus, &:active{
color:@textcolor;
box-shadow:inset 0 3px 0 0 darken(@color, 10%);
background:darken(@color, 4%);
-webkit-transition:all 300ms;
}
&.disabled, &:disabled, &[disabled]{
color:@textcolor;
opacity:0.8;
}
}
@itsjavi
Copy link
Author

itsjavi commented Mar 21, 2014

Usage:

.btn-inverse{
   .btn-factory(#222222, #FFFFFF);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment