Blame content/assets/css/bootstrap/_panels.scss

e8ec7a
//
e8ec7a
// Panels
e8ec7a
// --------------------------------------------------
e8ec7a
e8ec7a
e8ec7a
// Base class
e8ec7a
.panel {
e8ec7a
  margin-bottom: $line-height-computed;
e8ec7a
  background-color: $panel-bg;
e8ec7a
  border: 1px solid transparent;
e8ec7a
  border-radius: $panel-border-radius;
e8ec7a
  @include box-shadow(0 1px 1px rgba(0,0,0,.05));
e8ec7a
}
e8ec7a
e8ec7a
// Panel contents
e8ec7a
.panel-body {
e8ec7a
  padding: 15px;
e8ec7a
  @include clearfix();
e8ec7a
}
e8ec7a
e8ec7a
e8ec7a
// List groups in panels
e8ec7a
//
e8ec7a
// By default, space out list group content from panel headings to account for
e8ec7a
// any kind of custom content between the two.
e8ec7a
e8ec7a
.panel {
e8ec7a
  > .list-group {
e8ec7a
    margin-bottom: 0;
e8ec7a
e8ec7a
    .list-group-item {
e8ec7a
      border-width: 1px 0;
e8ec7a
e8ec7a
      // Remove border radius for top one
e8ec7a
      &:first-child {
e8ec7a
        @include border-top-radius(0);
e8ec7a
      }
e8ec7a
      // But keep it for the last one
e8ec7a
      &:last-child {
e8ec7a
        border-bottom: 0;
e8ec7a
      }
e8ec7a
    }
e8ec7a
  }
e8ec7a
}
e8ec7a
// Collapse space between when there's no additional content.
e8ec7a
.panel-heading + .list-group {
e8ec7a
  .list-group-item:first-child {
e8ec7a
    border-top-width: 0;
e8ec7a
  }
e8ec7a
}
e8ec7a
e8ec7a
e8ec7a
// Tables in panels
e8ec7a
//
e8ec7a
// Place a non-bordered `.table` within a panel (not within a `.panel-body`) and
e8ec7a
// watch it go full width.
e8ec7a
e8ec7a
.panel {
e8ec7a
  > .table {
e8ec7a
    margin-bottom: 0;
e8ec7a
  }
e8ec7a
  > .panel-body + .table {
e8ec7a
    border-top: 1px solid $table-border-color;
e8ec7a
  }
e8ec7a
}
e8ec7a
e8ec7a
e8ec7a
// Optional heading
e8ec7a
.panel-heading {
e8ec7a
  padding: 10px 15px;
e8ec7a
  border-bottom: 1px solid transparent;
e8ec7a
  @include border-top-radius($panel-border-radius - 1);
e8ec7a
}
e8ec7a
e8ec7a
// Within heading, strip any `h*` tag of it's default margins for spacing.
e8ec7a
.panel-title {
e8ec7a
  margin-top: 0;
e8ec7a
  margin-bottom: 0;
e8ec7a
  font-size: ceil(($font-size-base * 1.125));
e8ec7a
  > a {
e8ec7a
    color: inherit;
e8ec7a
  }
e8ec7a
}
e8ec7a
e8ec7a
// Optional footer (stays gray in every modifier class)
e8ec7a
.panel-footer {
e8ec7a
  padding: 10px 15px;
e8ec7a
  background-color: $panel-footer-bg;
e8ec7a
  border-top: 1px solid $panel-inner-border;
e8ec7a
  @include border-bottom-radius($panel-border-radius - 1);
e8ec7a
}
e8ec7a
e8ec7a
e8ec7a
// Collapsable panels (aka, accordion)
e8ec7a
//
e8ec7a
// Wrap a series of panels in `.panel-group` to turn them into an accordion with
e8ec7a
// the help of our collapse JavaScript plugin.
e8ec7a
e8ec7a
.panel-group {
e8ec7a
  // Tighten up margin so it's only between panels
e8ec7a
  .panel {
e8ec7a
    margin-bottom: 0;
e8ec7a
    border-radius: $panel-border-radius;
e8ec7a
    overflow: hidden; // crop contents when collapsed
e8ec7a
    + .panel {
e8ec7a
      margin-top: 5px;
e8ec7a
    }
e8ec7a
  }
e8ec7a
e8ec7a
  .panel-heading {
e8ec7a
    border-bottom: 0;
e8ec7a
    + .panel-collapse .panel-body {
e8ec7a
      border-top: 1px solid $panel-inner-border;
e8ec7a
    }
e8ec7a
  }
e8ec7a
  .panel-footer {
e8ec7a
    border-top: 0;
e8ec7a
    + .panel-collapse .panel-body {
e8ec7a
      border-bottom: 1px solid $panel-inner-border;
e8ec7a
    }
e8ec7a
  }
e8ec7a
e8ec7a
  // New subcomponent for wrapping collapsable content for proper animations
e8ec7a
  .panel-collapse {
e8ec7a
e8ec7a
  }
e8ec7a
}
e8ec7a
e8ec7a
e8ec7a
// Contextual variations
e8ec7a
.panel-default {
e8ec7a
  @include panel-variant($panel-default-border, $panel-default-text, $panel-default-heading-bg, $panel-default-border);
e8ec7a
}
e8ec7a
.panel-primary {
e8ec7a
  @include panel-variant($panel-primary-border, $panel-primary-text, $panel-primary-heading-bg, $panel-primary-border);
e8ec7a
}
e8ec7a
.panel-success {
e8ec7a
  @include panel-variant($panel-success-border, $panel-success-text, $panel-success-heading-bg, $panel-success-border);
e8ec7a
}
e8ec7a
.panel-warning {
e8ec7a
  @include panel-variant($panel-warning-border, $panel-warning-text, $panel-warning-heading-bg, $panel-warning-border);
e8ec7a
}
e8ec7a
.panel-danger {
e8ec7a
  @include panel-variant($panel-danger-border, $panel-danger-text, $panel-danger-heading-bg, $panel-danger-border);
e8ec7a
}
e8ec7a
.panel-info {
e8ec7a
  @include panel-variant($panel-info-border, $panel-info-text, $panel-info-heading-bg, $panel-info-border);
e8ec7a
}