diff options
author | MaZderMind | 2015-02-26 17:57:42 +0100 |
---|---|---|
committer | MaZderMind | 2015-02-26 17:57:42 +0100 |
commit | 6db2f0f4b9816ccd271332b89a05a9d0d753216b (patch) | |
tree | fd7ecf7cf16b33bdb75c45e747d12f9ecca43358 /assets/css/bootstrap-3.3.2/panels.less | |
parent | 9fb5b19bb0652b9c187c9b552c0a7ec4d6778222 (diff) |
shuffle things around on the way to a bootstrap-based configurable website
Diffstat (limited to '')
-rw-r--r-- | assets/css/bootstrap-3.3.2/panels.less (renamed from assets/css/lib/bootstrap/_panels.scss) | 94 |
1 files changed, 58 insertions, 36 deletions
diff --git a/assets/css/lib/bootstrap/_panels.scss b/assets/css/bootstrap-3.3.2/panels.less index 57cdcbc..04eb2b3 100644 --- a/assets/css/lib/bootstrap/_panels.scss +++ b/assets/css/bootstrap-3.3.2/panels.less @@ -5,24 +5,24 @@ // Base class .panel { - margin-bottom: $line-height-computed; - background-color: $panel-bg; + margin-bottom: @line-height-computed; + background-color: @panel-bg; border: 1px solid transparent; - border-radius: $panel-border-radius; - @include box-shadow(0 1px 1px rgba(0,0,0,.05)); + border-radius: @panel-border-radius; + .box-shadow(0 1px 1px rgba(0,0,0,.05)); } // Panel contents .panel-body { - padding: $panel-body-padding; - @include clearfix(); + padding: @panel-body-padding; + &:extend(.clearfix all); } // Optional heading .panel-heading { - padding: $panel-heading-padding; + padding: @panel-heading-padding; border-bottom: 1px solid transparent; - @include border-top-radius(($panel-border-radius - 1)); + .border-top-radius((@panel-border-radius - 1)); > .dropdown .dropdown-toggle { color: inherit; @@ -33,20 +33,24 @@ .panel-title { margin-top: 0; margin-bottom: 0; - font-size: ceil(($font-size-base * 1.125)); + font-size: ceil((@font-size-base * 1.125)); color: inherit; - > a { + > a, + > small, + > .small, + > small > a, + > .small > a { color: inherit; } } // Optional footer (stays gray in every modifier class) .panel-footer { - padding: $panel-footer-padding; - background-color: $panel-footer-bg; - border-top: 1px solid $panel-inner-border; - @include border-bottom-radius(($panel-border-radius - 1)); + padding: @panel-footer-padding; + background-color: @panel-footer-bg; + border-top: 1px solid @panel-inner-border; + .border-bottom-radius((@panel-border-radius - 1)); } @@ -56,7 +60,8 @@ // any kind of custom content between the two. .panel { - > .list-group { + > .list-group, + > .panel-collapse > .list-group { margin-bottom: 0; .list-group-item { @@ -68,14 +73,14 @@ &:first-child { .list-group-item:first-child { border-top: 0; - @include border-top-radius(($panel-border-radius - 1)); + .border-top-radius((@panel-border-radius - 1)); } } // Add border bottom radius for last one &:last-child { .list-group-item:last-child { border-bottom: 0; - @include border-bottom-radius(($panel-border-radius - 1)); + .border-bottom-radius((@panel-border-radius - 1)); } } } @@ -100,22 +105,30 @@ > .table-responsive > .table, > .panel-collapse > .table { margin-bottom: 0; + + caption { + padding-left: @panel-body-padding; + padding-right: @panel-body-padding; + } } // Add border top radius for first one > .table:first-child, > .table-responsive:first-child > .table:first-child { - @include border-top-radius(($panel-border-radius - 1)); + .border-top-radius((@panel-border-radius - 1)); > thead:first-child, > tbody:first-child { > tr:first-child { + border-top-left-radius: (@panel-border-radius - 1); + border-top-right-radius: (@panel-border-radius - 1); + td:first-child, th:first-child { - border-top-left-radius: ($panel-border-radius - 1); + border-top-left-radius: (@panel-border-radius - 1); } td:last-child, th:last-child { - border-top-right-radius: ($panel-border-radius - 1); + border-top-right-radius: (@panel-border-radius - 1); } } } @@ -123,25 +136,30 @@ // Add border bottom radius for last one > .table:last-child, > .table-responsive:last-child > .table:last-child { - @include border-bottom-radius(($panel-border-radius - 1)); + .border-bottom-radius((@panel-border-radius - 1)); > tbody:last-child, > tfoot:last-child { > tr:last-child { + border-bottom-left-radius: (@panel-border-radius - 1); + border-bottom-right-radius: (@panel-border-radius - 1); + td:first-child, th:first-child { - border-bottom-left-radius: ($panel-border-radius - 1); + border-bottom-left-radius: (@panel-border-radius - 1); } td:last-child, th:last-child { - border-bottom-right-radius: ($panel-border-radius - 1); + border-bottom-right-radius: (@panel-border-radius - 1); } } } } > .panel-body + .table, - > .panel-body + .table-responsive { - border-top: 1px solid $table-border-color; + > .panel-body + .table-responsive, + > .table + .panel-body, + > .table-responsive + .panel-body { + border-top: 1px solid @table-border-color; } > .table > tbody:first-child > tr:first-child th, > .table > tbody:first-child > tr:first-child td { @@ -196,12 +214,13 @@ // the help of our collapse JavaScript plugin. .panel-group { - margin-bottom: $line-height-computed; + margin-bottom: @line-height-computed; // Tighten up margin so it's only between panels .panel { margin-bottom: 0; - border-radius: $panel-border-radius; + border-radius: @panel-border-radius; + + .panel { margin-top: 5px; } @@ -209,14 +228,17 @@ .panel-heading { border-bottom: 0; - + .panel-collapse > .panel-body { - border-top: 1px solid $panel-inner-border; + + + .panel-collapse > .panel-body, + + .panel-collapse > .list-group { + border-top: 1px solid @panel-inner-border; } } + .panel-footer { border-top: 0; + .panel-collapse .panel-body { - border-bottom: 1px solid $panel-inner-border; + border-bottom: 1px solid @panel-inner-border; } } } @@ -224,20 +246,20 @@ // Contextual variations .panel-default { - @include panel-variant($panel-default-border, $panel-default-text, $panel-default-heading-bg, $panel-default-border); + .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border); } .panel-primary { - @include panel-variant($panel-primary-border, $panel-primary-text, $panel-primary-heading-bg, $panel-primary-border); + .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border); } .panel-success { - @include panel-variant($panel-success-border, $panel-success-text, $panel-success-heading-bg, $panel-success-border); + .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border); } .panel-info { - @include panel-variant($panel-info-border, $panel-info-text, $panel-info-heading-bg, $panel-info-border); + .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border); } .panel-warning { - @include panel-variant($panel-warning-border, $panel-warning-text, $panel-warning-heading-bg, $panel-warning-border); + .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border); } .panel-danger { - @include panel-variant($panel-danger-border, $panel-danger-text, $panel-danger-heading-bg, $panel-danger-border); + .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border); } |