Sha256: 8577287fc1c49a82690a83626993f6345068d6f54f73ea08045bb289a4d9def0

Contents?: true

Size: 1.72 KB

Versions: 15

Compression:

Stored size: 1.72 KB

Contents

// Button group
//
// A button group is a series of buttons laid out next to each other, all part
// of one visual button, but separated by rules to be separate.

.BtnGroup {
  display: inline-block;
  vertical-align: middle;
  @include clearfix();

  // Proper spacing for multiple button groups (a la, gollum editor)
  + .BtnGroup,
  + .btn {
    margin-left: $spacer-1;
  }
}

.BtnGroup-item {
  position: relative;
  float: left;
  border-right-width: 0;
  border-radius: 0;

  &:first-child {
    border-top-left-radius: $border-radius;
    border-bottom-left-radius: $border-radius;
  }

  &:last-child {
    border-right-width: $border-width;
    border-top-right-radius: $border-radius;
    border-bottom-right-radius: $border-radius;
  }

  &.selected,
  &[aria-selected="true"],
  &:focus,
  &:active,
  &:hover {
    border-right-width: $border-width;

    + .BtnGroup-item,
    + .BtnGroup-parent .BtnGroup-item {
      border-left-width: 0;
    }
  }
}

.BtnGroup-parent {
  float: left;

  &:first-child .BtnGroup-item {
    border-top-left-radius: $border-radius;
    border-bottom-left-radius: $border-radius;
  }

  &:last-child .BtnGroup-item {
    border-right-width: $border-width;
    border-top-right-radius: $border-radius;
    border-bottom-right-radius: $border-radius;
  }

  .BtnGroup-item {
    border-right-width: 0;
    border-radius: 0;
  }

  &.selected,
  &[aria-selected="true"],
  &:focus,
  &:active,
  &:hover {
    .BtnGroup-item {
      border-right-width: $border-width;
    }

    + .BtnGroup-item,
    + .BtnGroup-parent .BtnGroup-item {
      border-left-width: 0;
    }
  }
}

// ensure that the focus ring sits above the adjacent buttons
.BtnGroup-item,
.BtnGroup-parent {
  &:focus,
  &:active {
    z-index: 1;
  }
}

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
truesight-rtd-theme-1.0.1 _sass/lib/@primer/css/buttons/button-group.scss
truesight-rtd-theme-1.0.0 _sass/lib/@primer/css/buttons/button-group.scss
jekyll-rtd-theme-2.0.10 _sass/lib/@primer/css/buttons/button-group.scss
jekyll-rtd-theme-2.0.9 _sass/lib/@primer/css/buttons/button-group.scss
jekyll-rtd-theme-2.0.8 _sass/lib/@primer/css/buttons/button-group.scss
jekyll-rtd-theme-2.0.7 _sass/lib/@primer/css/buttons/button-group.scss
jekyll-rtd-theme-2.0.6 _sass/@primer/css/buttons/button-group.scss
jekyll-rtd-theme-2.0.5 _sass/@primer/css/buttons/button-group.scss
jekyll-rtd-theme-2.0.4 _sass/@primer/buttons/button-group.scss
jekyll-rtd-theme-2.0.3 _sass/@primer/buttons/button-group.scss
jekyll-rtd-theme-2.0.2 _sass/@primer/buttons/button-group.scss
jekyll-rtd-theme-2.0.1 _sass/@primer/buttons/button-group.scss
jekyll-rtd-theme-2.0.0 _sass/@primer/buttons/button-group.scss
jekyll-rtd-theme-2.0.0.pre.beta1 _sass/@primer/buttons/button-group.scss
jekyll-rtd-theme-2.0.0.pre.beta _sass/@primer/buttons/button-group.scss