/**
 * Copyright (c) Matthieu Jabbour. All Rights Reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */

 .ui-button-group {
  @include ui-margins(2gp);
  @each $color in primary secondary warning error {
    // Common to all buttons.
    & .ui-button {
      @include ui-margins(0gp);
      margin-left: -1px;
      border-radius: 0px;
      &:first-child {
        border-radius: ui-transpile($cornerRadius) 0px 0px ui-transpile($cornerRadius);
      }
      &:last-child {
        border-radius: 0px ui-transpile($cornerRadius) ui-transpile($cornerRadius) 0px;
      }
    }
    // For text buttons only.
    & .ui-button--text.ui-button--#{$color} {
      border-right: 1px solid #d9dadc;
      &:last-child {
        @include ui-borders($left: 0px solid transparent);
      }
    }
  }
}