You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.4KB

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