ButtonGroup.less 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // ButtonGroup
  2. .btn-group-border-left(@border-color) when (@has-button-borders = true) {
  3. border-left: 1px solid @border-color;
  4. }
  5. .btn-group-border-right(@border-color) when (@has-button-borders = true) {
  6. border-right: 1px solid @border-color;
  7. }
  8. .@{prefix}-btn-group .@{prefix}-btn {
  9. border-width: @btn-group-border-width;
  10. margin: 0;
  11. .border-radius(0);
  12. margin-left: @flow-layout-spacing;
  13. }
  14. .@{prefix}-btn-group .@{prefix}-btn when (@has-button-borders = true) {
  15. border-left-width: 0;
  16. border-right-width: 0;
  17. margin-left: 0;
  18. }
  19. .@{prefix}-btn-group:not(:first-child) when (@has-button-borders = true) {
  20. padding-left: 1px;
  21. margin-left: 1px;
  22. }
  23. .@{prefix}-btn-group:not(:first-child) when (@has-button-borders = false) {
  24. border-left: 1px solid darken(@btn-bg, 15%);
  25. padding-left: @flow-layout-spacing + 1px;
  26. margin-left: @flow-layout-spacing + 1px;
  27. }
  28. .@{prefix}-btn-group .@{prefix}-first {
  29. .border-radius(3px 0 0 3px);
  30. .btn-group-border-left(@btn-border-left);
  31. margin-left: 0;
  32. }
  33. .@{prefix}-btn-group .@{prefix}-last {
  34. .border-radius(0 3px 3px 0);
  35. .btn-group-border-right(@btn-border-right);
  36. }
  37. .@{prefix}-btn-group .@{prefix}-first.@{prefix}-last {
  38. .border-radius(3px);
  39. }
  40. .@{prefix}-btn-group .@{prefix}-btn.@{prefix}-flow-layout-item {
  41. margin: 0;
  42. }
  43. // RTL
  44. .@{prefix}-rtl .@{prefix}-btn-group .@{prefix}-btn {
  45. margin-left: 0;
  46. margin-right: @flow-layout-spacing;
  47. }
  48. .@{prefix}-rtl .@{prefix}-btn-group .@{prefix}-first {
  49. margin-right: 0;
  50. }
  51. .@{prefix}-rtl .@{prefix}-btn-group:not(:first-child) {
  52. border-left: none;
  53. border-right:1px solid darken(@btn-bg, 15%);
  54. padding-right: @flow-layout-spacing + 2px;
  55. margin-right: @flow-layout-spacing + 2px;
  56. }