3 // --------------------------------------------------
7 margin-bottom: $line-height-computed;
8 background-color: $panel-bg;
9 border: 1px solid transparent;
10 border-radius: $panel-border-radius;
11 @include box-shadow(0 1px 1px rgba(0, 0, 0, .05));
16 padding: $panel-body-padding;
22 padding: $panel-heading-padding;
23 border-bottom: 1px solid transparent;
24 @include border-top-radius(($panel-border-radius - 1));
26 > .dropdown .dropdown-toggle {
31 // Within heading, strip any `h*` tag of its default margins for spacing.
35 font-size: ceil(($font-size-base * 1.125));
47 // Optional footer (stays gray in every modifier class)
49 padding: $panel-footer-padding;
50 background-color: $panel-footer-bg;
51 border-top: 1px solid $panel-inner-border;
52 @include border-bottom-radius(($panel-border-radius - 1));
55 // List groups in panels
57 // By default, space out list group content from panel headings to account for
58 // any kind of custom content between the two.
62 > .panel-collapse > .list-group {
70 // Add border top radius for first one
72 .list-group-item:first-child {
74 @include border-top-radius(($panel-border-radius - 1));
78 // Add border bottom radius for last one
80 .list-group-item:last-child {
82 @include border-bottom-radius(($panel-border-radius - 1));
86 > .panel-heading + .panel-collapse > .list-group {
87 .list-group-item:first-child {
88 @include border-top-radius(0);
93 // Collapse space between when there's no additional content.
94 .panel-heading + .list-group {
95 .list-group-item:first-child {
100 .list-group + .panel-footer {
106 // Place a non-bordered `.table` within a panel (not within a `.panel-body`) and
107 // watch it go full width.
111 > .table-responsive > .table,
112 > .panel-collapse > .table {
116 padding-left: $panel-body-padding;
117 padding-right: $panel-body-padding;
120 // Add border top radius for first one
121 > .table:first-child,
122 > .table-responsive:first-child > .table:first-child {
123 @include border-top-radius(($panel-border-radius - 1));
126 > tbody:first-child {
128 border-top-left-radius: ($panel-border-radius - 1);
129 border-top-right-radius: ($panel-border-radius - 1);
133 border-top-left-radius: ($panel-border-radius - 1);
137 border-top-right-radius: ($panel-border-radius - 1);
142 // Add border bottom radius for last one
144 > .table-responsive:last-child > .table:last-child {
145 @include border-bottom-radius(($panel-border-radius - 1));
150 border-bottom-left-radius: ($panel-border-radius - 1);
151 border-bottom-right-radius: ($panel-border-radius - 1);
155 border-bottom-left-radius: ($panel-border-radius - 1);
159 border-bottom-right-radius: ($panel-border-radius - 1);
164 > .panel-body + .table,
165 > .panel-body + .table-responsive,
166 > .table + .panel-body,
167 > .table-responsive + .panel-body {
168 border-top: 1px solid $table-border-color;
170 > .table > tbody:first-child > tr:first-child th,
171 > .table > tbody:first-child > tr:first-child td {
175 > .table-responsive > .table-bordered {
210 > .table-responsive {
216 // Collapsable panels (aka, accordion)
218 // Wrap a series of panels in `.panel-group` to turn them into an accordion with
219 // the help of our collapse JavaScript plugin.
222 margin-bottom: $line-height-computed;
224 // Tighten up margin so it's only between panels
227 border-radius: $panel-border-radius;
237 + .panel-collapse > .panel-body,
238 + .panel-collapse > .list-group {
239 border-top: 1px solid $panel-inner-border;
245 + .panel-collapse .panel-body {
246 border-bottom: 1px solid $panel-inner-border;
251 // Contextual variations
253 @include panel-variant($panel-default-border, $panel-default-text, $panel-default-heading-bg, $panel-default-border);
257 @include panel-variant($panel-primary-border, $panel-primary-text, $panel-primary-heading-bg, $panel-primary-border);
261 @include panel-variant($panel-success-border, $panel-success-text, $panel-success-heading-bg, $panel-success-border);
265 @include panel-variant($panel-info-border, $panel-info-text, $panel-info-heading-bg, $panel-info-border);
269 @include panel-variant($panel-warning-border, $panel-warning-text, $panel-warning-heading-bg, $panel-warning-border);
273 @include panel-variant($panel-danger-border, $panel-danger-text, $panel-danger-heading-bg, $panel-danger-border);