buttons.less 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. &:active,
  12. &.active,
  13. .open > .dropdown-toggle& {
  14. color: @color;
  15. background-color: darken(@background, 10%);
  16. border-color: darken(@border, 12%);
  17. }
  18. &:active,
  19. &.active,
  20. .open > .dropdown-toggle& {
  21. background-image: none;
  22. }
  23. &.disabled,
  24. &[disabled],
  25. fieldset[disabled] & {
  26. &,
  27. &:hover,
  28. &:focus,
  29. &:active,
  30. &.active {
  31. background-color: @background;
  32. border-color: @border;
  33. }
  34. }
  35. .badge {
  36. color: @background;
  37. background-color: @color;
  38. }
  39. }
  40. // Button sizes
  41. .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
  42. padding: @padding-vertical @padding-horizontal;
  43. font-size: @font-size;
  44. line-height: @line-height;
  45. border-radius: @border-radius;
  46. }