button-groups.less 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. //
  2. // Button groups
  3. // --------------------------------------------------
  4. .btn-group {
  5. > .btn {
  6. & + .btn {
  7. margin-left: 0;
  8. }
  9. & + .dropdown-toggle {
  10. border-left: 2px solid fade(@brand-primary, 15%);
  11. padding: 10px 12px;
  12. .caret {
  13. margin-left: 3px;
  14. margin-right: 3px;
  15. }
  16. }
  17. &.btn-gh + .dropdown-toggle {
  18. .caret {
  19. margin-left: 7px;
  20. margin-right: 7px;
  21. }
  22. }
  23. &.btn-sm + .dropdown-toggle {
  24. .caret {
  25. margin-left: 0;
  26. margin-right: 0;
  27. }
  28. }
  29. }
  30. }
  31. .dropdown-toggle {
  32. .caret {
  33. margin-left: 8px;
  34. }
  35. }
  36. // Sizing
  37. //
  38. // Remix the default button sizing classes into new ones for easier manipulation.
  39. .btn-group-xs > .btn {
  40. &:extend(.btn-xs);
  41. & + .dropdown-toggle {
  42. padding: 6px 9px;
  43. }
  44. }
  45. .btn-group-sm > .btn {
  46. &:extend(.btn-sm);
  47. & + .dropdown-toggle {
  48. padding: 9px 13px;
  49. }
  50. }
  51. .btn-group-lg > .btn {
  52. &:extend(.btn-lg);
  53. & + .dropdown-toggle {
  54. padding: 10px 19px;
  55. }
  56. }
  57. .btn-group-hg > .btn {
  58. &:extend(.btn-hg);
  59. & + .dropdown-toggle {
  60. padding: 13px 20px;
  61. }
  62. }
  63. // Carets in other button sizes
  64. .btn-xs .caret {
  65. border-width: @caret-width-xs-vertical @caret-width-xs 0;
  66. border-bottom-width: 0;
  67. }
  68. .btn-lg .caret {
  69. border-width: @caret-width-base-vertical @caret-width-base 0;
  70. border-bottom-width: 0;
  71. }
  72. // Upside down carets for .dropup
  73. .dropup .btn-lg .caret {
  74. border-width: 0 @caret-width-base @caret-width-base-vertical;
  75. }
  76. .dropup .btn-xs .caret {
  77. border-width: 0 @caret-width-xs @caret-width-xs-vertical;
  78. }
  79. .btn-group > .btn,
  80. .btn-group > .dropdown-menu,
  81. .btn-group > .popover {
  82. font-weight: 400;
  83. }
  84. .btn-group:focus .dropdown-toggle {
  85. outline: none;
  86. transition: .25s;
  87. }
  88. // The clickable button for toggling the menu
  89. // Remove the gradient and set the same inset shadow as the :active state
  90. .btn-group.open .dropdown-toggle {
  91. color: fade(@btn-default-color, 75%);
  92. box-shadow: none;
  93. }
  94. // Other button locations
  95. // Button with icon inside
  96. .btn-toolbar .btn {
  97. &.active {
  98. color: @btn-default-color;
  99. }
  100. > [class^="fui-"] {
  101. font-size: @icon-normal;
  102. margin: 0 1px;
  103. }
  104. }