split-menu.less 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. .split-menu {
  2. display: flex;
  3. &.btn-md,
  4. &.btn-sm,
  5. &.btn-xs {
  6. padding: 0;
  7. }
  8. &.btn-md {
  9. & > .split-menu-button,
  10. & > .split-menu-dropdown-toggle {
  11. height: 36px;
  12. }
  13. }
  14. &.btn-sm {
  15. & > .split-menu-button,
  16. & > .split-menu-dropdown-toggle {
  17. height: 32px;
  18. }
  19. }
  20. &.btn-xs {
  21. & > .split-menu-button,
  22. & > .split-menu-dropdown-toggle {
  23. height: 28px;
  24. }
  25. }
  26. &.btn-primary {
  27. background-color: @ol-green;
  28. }
  29. .split-menu-icon {
  30. margin-right: @line-height-computed / 4;
  31. }
  32. .split-menu-button {
  33. border-top-right-radius: 0;
  34. border-bottom-right-radius: 0;
  35. height: 100%;
  36. padding-top: 0;
  37. padding-bottom: 0;
  38. &.btn-primary {
  39. border-right: 1px solid fade(@neutral-90, 16%);
  40. }
  41. &.btn-danger {
  42. border-right: 1px solid fade(@neutral-90, 16%);
  43. }
  44. &.no-left-radius {
  45. border-top-left-radius: 0;
  46. border-bottom-left-radius: 0;
  47. }
  48. }
  49. .split-menu-button {
  50. // workaround for for the blue 2x border on the new css
  51. // if z-index rule is not added, the border will overlap under the `split-menu-dropdown-toggle` since margin between both component is only 1px
  52. z-index: 1;
  53. }
  54. .split-menu-dropdown {
  55. float: none;
  56. display: flex;
  57. flex-wrap: nowrap;
  58. align-self: stretch;
  59. margin-right: 6px;
  60. .split-menu-dropdown-toggle {
  61. border-bottom-left-radius: 0;
  62. border-top-left-radius: 0;
  63. padding: 0 8px;
  64. // on new css, btn-secondary has a border
  65. // since the border between both buttons already been defined in the `split-menu-button`
  66. // we will remove the rule from the dropdown toggle
  67. &.btn-secondary {
  68. border-left: none;
  69. }
  70. &.no-left-border {
  71. border-left: none;
  72. }
  73. }
  74. }
  75. }