buttons.less 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Button variants
  2. //
  3. // Easily pump out default styles, as well as :hover, :focus, :active,
  4. // and disabled options for all buttons
  5. .button-variant(@color; @background; @border) {
  6. color: @color;
  7. background-color: @background;
  8. border-color: @border;
  9. &:hover,
  10. &:focus,
  11. &.focus,
  12. &:active,
  13. &.active,
  14. .open > .dropdown-toggle& {
  15. color: @color;
  16. background-color: darken(@background, 10%);
  17. border-color: darken(@border, 12%);
  18. }
  19. &:active,
  20. &.active,
  21. .open > .dropdown-toggle& {
  22. background-image: none;
  23. }
  24. &.disabled,
  25. &[disabled],
  26. fieldset[disabled] & {
  27. &,
  28. &:hover,
  29. &:focus,
  30. &.focus,
  31. &:active,
  32. &.active {
  33. background-color: @background;
  34. border-color: @border;
  35. }
  36. }
  37. .badge {
  38. color: @background;
  39. background-color: @color;
  40. }
  41. }
  42. // Button sizes
  43. .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
  44. padding: @padding-vertical @padding-horizontal;
  45. font-size: @font-size;
  46. line-height: @line-height;
  47. border-radius: @border-radius;
  48. }