Blame view

app/bower_components/bootstrap/less/tables.less 4.5 KB
f986e111b   TRUONG   add libs
1
2
3
4
5
6
  //
  // Tables
  // --------------------------------------------------
  
  
  table {
f986e111b   TRUONG   add libs
7
8
    background-color: @table-bg;
  }
87c93a029   Dang YoungWorld   add modal
9
10
11
12
13
14
  caption {
    padding-top: @table-cell-padding;
    padding-bottom: @table-cell-padding;
    color: @text-muted;
    text-align: left;
  }
f986e111b   TRUONG   add libs
15
16
17
18
19
20
21
22
23
  th {
    text-align: left;
  }
  
  
  // Baseline styles
  
  .table {
    width: 100%;
87c93a029   Dang YoungWorld   add modal
24
    max-width: 100%;
f986e111b   TRUONG   add libs
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    margin-bottom: @line-height-computed;
    // Cells
    > thead,
    > tbody,
    > tfoot {
      > tr {
        > th,
        > td {
          padding: @table-cell-padding;
          line-height: @line-height-base;
          vertical-align: top;
          border-top: 1px solid @table-border-color;
        }
      }
    }
    // Bottom align for column headings
    > thead > tr > th {
      vertical-align: bottom;
      border-bottom: 2px solid @table-border-color;
    }
    // Remove top border from thead by default
    > caption + thead,
    > colgroup + thead,
    > thead:first-child {
      > tr:first-child {
        > th,
        > td {
          border-top: 0;
        }
      }
    }
    // Account for multiple tbody instances
    > tbody + tbody {
      border-top: 2px solid @table-border-color;
    }
  
    // Nesting
    .table {
      background-color: @body-bg;
    }
  }
  
  
  // Condensed table w/ half padding
  
  .table-condensed {
    > thead,
    > tbody,
    > tfoot {
      > tr {
        > th,
        > td {
          padding: @table-condensed-cell-padding;
        }
      }
    }
  }
  
  
  // Bordered version
  //
  // Add borders all around the table and between all the columns.
  
  .table-bordered {
    border: 1px solid @table-border-color;
    > thead,
    > tbody,
    > tfoot {
      > tr {
        > th,
        > td {
          border: 1px solid @table-border-color;
        }
      }
    }
    > thead > tr {
      > th,
      > td {
        border-bottom-width: 2px;
      }
    }
  }
  
  
  // Zebra-striping
  //
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
  
  .table-striped {
87c93a029   Dang YoungWorld   add modal
114
115
    > tbody > tr:nth-of-type(odd) {
      background-color: @table-bg-accent;
f986e111b   TRUONG   add libs
116
117
118
119
120
121
122
123
124
125
    }
  }
  
  
  // Hover effect
  //
  // Placed here since it has to come after the potential zebra striping
  
  .table-hover {
    > tbody > tr:hover {
87c93a029   Dang YoungWorld   add modal
126
      background-color: @table-bg-hover;
f986e111b   TRUONG   add libs
127
128
129
130
131
132
133
134
135
    }
  }
  
  
  // Table cell sizing
  //
  // Reset default table behavior
  
  table col[class*="col-"] {
87c93a029   Dang YoungWorld   add modal
136
    position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
f986e111b   TRUONG   add libs
137
138
139
140
141
142
143
    float: none;
    display: table-column;
  }
  table {
    td,
    th {
      &[class*="col-"] {
87c93a029   Dang YoungWorld   add modal
144
        position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
f986e111b   TRUONG   add libs
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
        float: none;
        display: table-cell;
      }
    }
  }
  
  
  // Table backgrounds
  //
  // Exact selectors below required to override `.table-striped` and prevent
  // inheritance to nested tables.
  
  // Generate the contextual variants
  .table-row-variant(active; @table-bg-active);
  .table-row-variant(success; @state-success-bg);
87c93a029   Dang YoungWorld   add modal
160
  .table-row-variant(info; @state-info-bg);
f986e111b   TRUONG   add libs
161
  .table-row-variant(warning; @state-warning-bg);
87c93a029   Dang YoungWorld   add modal
162
  .table-row-variant(danger; @state-danger-bg);
f986e111b   TRUONG   add libs
163
164
165
166
167
168
169
  
  
  // Responsive tables
  //
  // Wrap your tables in `.table-responsive` and we'll make them mobile friendly
  // by enabling horizontal scrolling. Only applies <768px. Everything above that
  // will display normally.
87c93a029   Dang YoungWorld   add modal
170
171
172
173
174
  .table-responsive {
    overflow-x: auto;
    min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)
  
    @media screen and (max-width: @screen-xs-max) {
f986e111b   TRUONG   add libs
175
176
177
      width: 100%;
      margin-bottom: (@line-height-computed * 0.75);
      overflow-y: hidden;
f986e111b   TRUONG   add libs
178
179
      -ms-overflow-style: -ms-autohiding-scrollbar;
      border: 1px solid @table-border-color;
f986e111b   TRUONG   add libs
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
  
      // Tighten up spacing
      > .table {
        margin-bottom: 0;
  
        // Ensure the content doesn't wrap
        > thead,
        > tbody,
        > tfoot {
          > tr {
            > th,
            > td {
              white-space: nowrap;
            }
          }
        }
      }
  
      // Special overrides for the bordered tables
      > .table-bordered {
        border: 0;
  
        // Nuke the appropriate borders so that the parent can handle them
        > thead,
        > tbody,
        > tfoot {
          > tr {
            > th:first-child,
            > td:first-child {
              border-left: 0;
            }
            > th:last-child,
            > td:last-child {
              border-right: 0;
            }
          }
        }
  
        // Only nuke the last row's bottom-border in `tbody` and `tfoot` since
        // chances are there will be only one `tr` in a `thead` and that would
        // remove the border altogether.
        > tbody,
        > tfoot {
          > tr:last-child {
            > th,
            > td {
              border-bottom: 0;
            }
          }
        }
  
      }
    }
  }