authserver/testCAS/resources/assets/less/bootstrap/panels.less
changeset 0 1afc9d2ab94d
equal deleted inserted replaced
-1:000000000000 0:1afc9d2ab94d
       
     1 //
       
     2 // Panels
       
     3 // --------------------------------------------------
       
     4 
       
     5 
       
     6 // Base class
       
     7 .panel {
       
     8   margin-bottom: @line-height-computed;
       
     9   background-color: @panel-bg;
       
    10   border: 1px solid transparent;
       
    11   border-radius: @panel-border-radius;
       
    12   .box-shadow(0 1px 1px rgba(0,0,0,.05));
       
    13 }
       
    14 
       
    15 // Panel contents
       
    16 .panel-body {
       
    17   padding: @panel-body-padding;
       
    18   &:extend(.clearfix all);
       
    19 }
       
    20 
       
    21 // Optional heading
       
    22 .panel-heading {
       
    23   padding: @panel-heading-padding;
       
    24   border-bottom: 1px solid transparent;
       
    25   .border-top-radius((@panel-border-radius - 1));
       
    26 
       
    27   > .dropdown .dropdown-toggle {
       
    28     color: inherit;
       
    29   }
       
    30 }
       
    31 
       
    32 // Within heading, strip any `h*` tag of its default margins for spacing.
       
    33 .panel-title {
       
    34   margin-top: 0;
       
    35   margin-bottom: 0;
       
    36   font-size: ceil((@font-size-base * 1.125));
       
    37   color: inherit;
       
    38 
       
    39   > a {
       
    40     color: inherit;
       
    41   }
       
    42 }
       
    43 
       
    44 // Optional footer (stays gray in every modifier class)
       
    45 .panel-footer {
       
    46   padding: @panel-footer-padding;
       
    47   background-color: @panel-footer-bg;
       
    48   border-top: 1px solid @panel-inner-border;
       
    49   .border-bottom-radius((@panel-border-radius - 1));
       
    50 }
       
    51 
       
    52 
       
    53 // List groups in panels
       
    54 //
       
    55 // By default, space out list group content from panel headings to account for
       
    56 // any kind of custom content between the two.
       
    57 
       
    58 .panel {
       
    59   > .list-group,
       
    60   > .panel-collapse > .list-group {
       
    61     margin-bottom: 0;
       
    62 
       
    63     .list-group-item {
       
    64       border-width: 1px 0;
       
    65       border-radius: 0;
       
    66     }
       
    67 
       
    68     // Add border top radius for first one
       
    69     &:first-child {
       
    70       .list-group-item:first-child {
       
    71         border-top: 0;
       
    72         .border-top-radius((@panel-border-radius - 1));
       
    73       }
       
    74     }
       
    75     // Add border bottom radius for last one
       
    76     &:last-child {
       
    77       .list-group-item:last-child {
       
    78         border-bottom: 0;
       
    79         .border-bottom-radius((@panel-border-radius - 1));
       
    80       }
       
    81     }
       
    82   }
       
    83 }
       
    84 // Collapse space between when there's no additional content.
       
    85 .panel-heading + .list-group {
       
    86   .list-group-item:first-child {
       
    87     border-top-width: 0;
       
    88   }
       
    89 }
       
    90 .list-group + .panel-footer {
       
    91   border-top-width: 0;
       
    92 }
       
    93 
       
    94 // Tables in panels
       
    95 //
       
    96 // Place a non-bordered `.table` within a panel (not within a `.panel-body`) and
       
    97 // watch it go full width.
       
    98 
       
    99 .panel {
       
   100   > .table,
       
   101   > .table-responsive > .table,
       
   102   > .panel-collapse > .table {
       
   103     margin-bottom: 0;
       
   104 
       
   105     caption {
       
   106       padding-left: @panel-body-padding;
       
   107       padding-right: @panel-body-padding;
       
   108     }
       
   109   }
       
   110   // Add border top radius for first one
       
   111   > .table:first-child,
       
   112   > .table-responsive:first-child > .table:first-child {
       
   113     .border-top-radius((@panel-border-radius - 1));
       
   114 
       
   115     > thead:first-child,
       
   116     > tbody:first-child {
       
   117       > tr:first-child {
       
   118         border-top-left-radius: (@panel-border-radius - 1);
       
   119         border-top-right-radius: (@panel-border-radius - 1);
       
   120 
       
   121         td:first-child,
       
   122         th:first-child {
       
   123           border-top-left-radius: (@panel-border-radius - 1);
       
   124         }
       
   125         td:last-child,
       
   126         th:last-child {
       
   127           border-top-right-radius: (@panel-border-radius - 1);
       
   128         }
       
   129       }
       
   130     }
       
   131   }
       
   132   // Add border bottom radius for last one
       
   133   > .table:last-child,
       
   134   > .table-responsive:last-child > .table:last-child {
       
   135     .border-bottom-radius((@panel-border-radius - 1));
       
   136 
       
   137     > tbody:last-child,
       
   138     > tfoot:last-child {
       
   139       > tr:last-child {
       
   140         border-bottom-left-radius: (@panel-border-radius - 1);
       
   141         border-bottom-right-radius: (@panel-border-radius - 1);
       
   142 
       
   143         td:first-child,
       
   144         th:first-child {
       
   145           border-bottom-left-radius: (@panel-border-radius - 1);
       
   146         }
       
   147         td:last-child,
       
   148         th:last-child {
       
   149           border-bottom-right-radius: (@panel-border-radius - 1);
       
   150         }
       
   151       }
       
   152     }
       
   153   }
       
   154   > .panel-body + .table,
       
   155   > .panel-body + .table-responsive,
       
   156   > .table + .panel-body,
       
   157   > .table-responsive + .panel-body {
       
   158     border-top: 1px solid @table-border-color;
       
   159   }
       
   160   > .table > tbody:first-child > tr:first-child th,
       
   161   > .table > tbody:first-child > tr:first-child td {
       
   162     border-top: 0;
       
   163   }
       
   164   > .table-bordered,
       
   165   > .table-responsive > .table-bordered {
       
   166     border: 0;
       
   167     > thead,
       
   168     > tbody,
       
   169     > tfoot {
       
   170       > tr {
       
   171         > th:first-child,
       
   172         > td:first-child {
       
   173           border-left: 0;
       
   174         }
       
   175         > th:last-child,
       
   176         > td:last-child {
       
   177           border-right: 0;
       
   178         }
       
   179       }
       
   180     }
       
   181     > thead,
       
   182     > tbody {
       
   183       > tr:first-child {
       
   184         > td,
       
   185         > th {
       
   186           border-bottom: 0;
       
   187         }
       
   188       }
       
   189     }
       
   190     > tbody,
       
   191     > tfoot {
       
   192       > tr:last-child {
       
   193         > td,
       
   194         > th {
       
   195           border-bottom: 0;
       
   196         }
       
   197       }
       
   198     }
       
   199   }
       
   200   > .table-responsive {
       
   201     border: 0;
       
   202     margin-bottom: 0;
       
   203   }
       
   204 }
       
   205 
       
   206 
       
   207 // Collapsable panels (aka, accordion)
       
   208 //
       
   209 // Wrap a series of panels in `.panel-group` to turn them into an accordion with
       
   210 // the help of our collapse JavaScript plugin.
       
   211 
       
   212 .panel-group {
       
   213   margin-bottom: @line-height-computed;
       
   214 
       
   215   // Tighten up margin so it's only between panels
       
   216   .panel {
       
   217     margin-bottom: 0;
       
   218     border-radius: @panel-border-radius;
       
   219 
       
   220     + .panel {
       
   221       margin-top: 5px;
       
   222     }
       
   223   }
       
   224 
       
   225   .panel-heading {
       
   226     border-bottom: 0;
       
   227 
       
   228     + .panel-collapse > .panel-body,
       
   229     + .panel-collapse > .list-group {
       
   230       border-top: 1px solid @panel-inner-border;
       
   231     }
       
   232   }
       
   233 
       
   234   .panel-footer {
       
   235     border-top: 0;
       
   236     + .panel-collapse .panel-body {
       
   237       border-bottom: 1px solid @panel-inner-border;
       
   238     }
       
   239   }
       
   240 }
       
   241 
       
   242 
       
   243 // Contextual variations
       
   244 .panel-default {
       
   245   .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);
       
   246 }
       
   247 .panel-primary {
       
   248   .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);
       
   249 }
       
   250 .panel-success {
       
   251   .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);
       
   252 }
       
   253 .panel-info {
       
   254   .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);
       
   255 }
       
   256 .panel-warning {
       
   257   .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);
       
   258 }
       
   259 .panel-danger {
       
   260   .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);
       
   261 }