vendor/toolkit/twitter/bootstrap/panels.less in twitter-bootswatch-rails-3.0.3.0 vs vendor/toolkit/twitter/bootstrap/panels.less in twitter-bootswatch-rails-3.1.0.0
- old
+ new
@@ -12,12 +12,12 @@
.box-shadow(0 1px 1px rgba(0,0,0,.05));
}
// Panel contents
.panel-body {
- padding: 15px;
- .clearfix();
+ padding: @panel-body-padding;
+ &:extend(.clearfix all);
}
// List groups in panels
//
@@ -25,23 +25,32 @@
// any kind of custom content between the two.
.panel {
> .list-group {
margin-bottom: 0;
-
.list-group-item {
border-width: 1px 0;
-
- // Remove border radius for top one
+ border-radius: 0;
&:first-child {
- .border-top-radius(0);
+ border-top: 0;
}
- // But keep it for the last one
&:last-child {
border-bottom: 0;
}
}
+ // Add border top radius for first one
+ &:first-child {
+ .list-group-item:first-child {
+ .border-top-radius((@panel-border-radius - 1));
+ }
+ }
+ // Add border bottom radius for last one
+ &:last-child {
+ .list-group-item:last-child {
+ .border-bottom-radius((@panel-border-radius - 1));
+ }
+ }
}
}
// Collapse space between when there's no additional content.
.panel-heading + .list-group {
.list-group-item:first-child {
@@ -58,16 +67,50 @@
.panel {
> .table,
> .table-responsive > .table {
margin-bottom: 0;
}
+ // Add border top radius for first one
+ > .table:first-child,
+ > .table-responsive:first-child > .table:first-child {
+ > thead:first-child,
+ > tbody:first-child {
+ > tr:first-child {
+ td:first-child,
+ th:first-child {
+ border-top-left-radius: (@panel-border-radius - 1);
+ }
+ td:last-child,
+ th:last-child {
+ border-top-right-radius: (@panel-border-radius - 1);
+ }
+ }
+ }
+ }
+ // Add border bottom radius for last one
+ > .table:last-child,
+ > .table-responsive:last-child > .table:last-child {
+ > tbody:last-child,
+ > tfoot:last-child {
+ > tr:last-child {
+ td:first-child,
+ th:first-child {
+ border-bottom-left-radius: (@panel-border-radius - 1);
+ }
+ td:last-child,
+ th:last-child {
+ border-bottom-right-radius: (@panel-border-radius - 1);
+ }
+ }
+ }
+ }
> .panel-body + .table,
> .panel-body + .table-responsive {
border-top: 1px solid @table-border-color;
}
- > .table > tbody:first-child th,
- > .table > tbody:first-child td {
+ > .table > tbody:first-child > tr:first-child th,
+ > .table > tbody:first-child > tr:first-child td {
border-top: 0;
}
> .table-bordered,
> .table-responsive > .table-bordered {
border: 0;
@@ -81,11 +124,14 @@
}
> th:last-child,
> td:last-child {
border-right: 0;
}
-
+ &:first-child > th,
+ &:first-child > td {
+ border-top: 0;
+ }
&:last-child > th,
&:last-child > td {
border-bottom: 0;
}
}
@@ -100,18 +146,18 @@
// Optional heading
.panel-heading {
padding: 10px 15px;
border-bottom: 1px solid transparent;
- .border-top-radius(@panel-border-radius - 1);
+ .border-top-radius((@panel-border-radius - 1));
> .dropdown .dropdown-toggle {
color: inherit;
}
}
-// Within heading, strip any `h*` tag of it's default margins for spacing.
+// Within heading, strip any `h*` tag of its default margins for spacing.
.panel-title {
margin-top: 0;
margin-bottom: 0;
font-size: ceil((@font-size-base * 1.125));
color: inherit;
@@ -124,20 +170,22 @@
// Optional footer (stays gray in every modifier class)
.panel-footer {
padding: 10px 15px;
background-color: @panel-footer-bg;
border-top: 1px solid @panel-inner-border;
- .border-bottom-radius(@panel-border-radius - 1);
+ .border-bottom-radius((@panel-border-radius - 1));
}
// Collapsable panels (aka, accordion)
//
// Wrap a series of panels in `.panel-group` to turn them into an accordion with
// the help of our collapse JavaScript plugin.
.panel-group {
+ margin-bottom: @line-height-computed;
+
// Tighten up margin so it's only between panels
.panel {
margin-bottom: 0;
border-radius: @panel-border-radius;
overflow: hidden; // crop contents when collapsed
@@ -169,14 +217,14 @@
.panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);
}
.panel-success {
.panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);
}
+.panel-info {
+ .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);
+}
.panel-warning {
.panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);
}
.panel-danger {
.panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);
-}
-.panel-info {
- .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);
}