@stackoverflow/stacks 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -47
- package/dist/controllers/s-popover.d.ts +11 -2
- package/dist/css/stacks.css +257 -8
- package/dist/css/stacks.min.css +1 -1
- package/dist/js/stacks.js +18 -2
- package/dist/js/stacks.min.js +1 -1
- package/lib/css/atomic/borders.less +378 -378
- package/lib/css/atomic/colors.less +209 -209
- package/lib/css/atomic/flex.less +375 -375
- package/lib/css/atomic/grid.less +174 -174
- package/lib/css/atomic/misc.less +343 -343
- package/lib/css/atomic/spacing.less +342 -314
- package/lib/css/atomic/typography.less +273 -273
- package/lib/css/atomic/width-height.less +194 -194
- package/lib/css/base/body.less +44 -44
- package/lib/css/base/configuration-static.less +61 -61
- package/lib/css/base/icons.less +20 -20
- package/lib/css/base/internals.less +220 -220
- package/lib/css/base/reset-meyer.less +64 -64
- package/lib/css/base/reset-normalize.less +449 -449
- package/lib/css/base/reset.less +20 -20
- package/lib/css/components/activity-indicator.less +44 -45
- package/lib/css/components/avatars.less +189 -189
- package/lib/css/components/badges.less +254 -209
- package/lib/css/components/banners.less +80 -80
- package/lib/css/components/blank-states.less +26 -26
- package/lib/css/components/breadcrumbs.less +44 -44
- package/lib/css/components/button-groups.less +104 -104
- package/lib/css/components/buttons.less +665 -665
- package/lib/css/components/cards.less +44 -44
- package/lib/css/components/code-blocks.less +130 -130
- package/lib/css/components/collapsible.less +104 -104
- package/lib/css/components/inputs.less +728 -728
- package/lib/css/components/link-previews.less +136 -136
- package/lib/css/components/links.less +218 -218
- package/lib/css/components/menu.less +47 -47
- package/lib/css/components/modals.less +133 -133
- package/lib/css/components/navigation.less +146 -146
- package/lib/css/components/notices.less +233 -233
- package/lib/css/components/page-titles.less +60 -60
- package/lib/css/components/pagination.less +55 -55
- package/lib/css/components/popovers.less +197 -197
- package/lib/css/components/post-summary.less +436 -425
- package/lib/css/components/progress-bars.less +330 -330
- package/lib/css/components/prose.less +503 -503
- package/lib/css/components/spinner.less +107 -107
- package/lib/css/components/tables.less +341 -341
- package/lib/css/components/tags.less +236 -236
- package/lib/css/components/toggle-switches.less +144 -144
- package/lib/css/components/topbar.less +427 -427
- package/lib/css/components/uploader.less +210 -210
- package/lib/css/components/user-cards.less +169 -169
- package/lib/css/components/widget-dynamic.less +33 -33
- package/lib/css/components/widget-static.less +273 -273
- package/lib/css/exports/constants-colors.less +1092 -1092
- package/lib/css/exports/constants-helpers.less +108 -108
- package/lib/css/exports/constants-type.less +153 -153
- package/lib/css/exports/exports.less +15 -15
- package/lib/css/exports/mixins.less +237 -237
- package/lib/css/stacks-dynamic.less +35 -35
- package/lib/css/stacks-static.less +86 -86
- package/lib/css/stacks.less +13 -13
- package/lib/ts/controllers/index.ts +7 -7
- package/lib/ts/controllers/s-expandable-control.ts +188 -188
- package/lib/ts/controllers/s-modal.ts +321 -321
- package/lib/ts/controllers/s-navigation-tablist.ts +117 -117
- package/lib/ts/controllers/s-popover.ts +567 -547
- package/lib/ts/controllers/s-table.ts +220 -220
- package/lib/ts/controllers/s-tooltip.ts +246 -246
- package/lib/ts/controllers/s-uploader.ts +172 -172
- package/lib/ts/index.ts +20 -20
- package/lib/ts/stacks.ts +88 -88
- package/lib/tsconfig.json +13 -13
- package/package.json +86 -87
|
@@ -1,341 +1,341 @@
|
|
|
1
|
-
//
|
|
2
|
-
// STACK OVERFLOW
|
|
3
|
-
// TABLES
|
|
4
|
-
//
|
|
5
|
-
// This CSS comes from Stacks, our CSS & Pattern library for rapidly building
|
|
6
|
-
// Stack Overflow. For documentation of all these classes and how to contribute,
|
|
7
|
-
// visit https://stackoverflow.design/
|
|
8
|
-
//
|
|
9
|
-
// TABLE OF CONTENTS
|
|
10
|
-
// • CONTAINER
|
|
11
|
-
// • BASE TABLE STYLE
|
|
12
|
-
// • TABLE ALIGNMENT
|
|
13
|
-
// - Vertical alignment
|
|
14
|
-
// - Text alignment
|
|
15
|
-
// • LAYOUT VARIATIONS
|
|
16
|
-
// - Stripes
|
|
17
|
-
// - Spacing
|
|
18
|
-
// - Borders
|
|
19
|
-
// - Backgrounds
|
|
20
|
-
// - Totals row
|
|
21
|
-
// - Sortable tables
|
|
22
|
-
// • TABLE CELL SIZES
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
// ============================================================================
|
|
26
|
-
// $ CONTAINER
|
|
27
|
-
// Give tables an optional container for responsive scrolling
|
|
28
|
-
// ----------------------------------------------------------------------------
|
|
29
|
-
.s-table-container {
|
|
30
|
-
overflow-x: auto;
|
|
31
|
-
@scrollbar-styles();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// ============================================================================
|
|
35
|
-
// $ BASE TABLE STYLE
|
|
36
|
-
// ----------------------------------------------------------------------------
|
|
37
|
-
.s-table {
|
|
38
|
-
display: table;
|
|
39
|
-
width: 100%;
|
|
40
|
-
max-width: 100%;
|
|
41
|
-
border-collapse: collapse;
|
|
42
|
-
border-spacing: 0;
|
|
43
|
-
font-size: var(--fs-body1);
|
|
44
|
-
|
|
45
|
-
th,
|
|
46
|
-
td {
|
|
47
|
-
padding: var(--su8);
|
|
48
|
-
border-top: 1px solid var(--bc-medium);
|
|
49
|
-
border-left: 1px solid var(--bc-medium);
|
|
50
|
-
border-right: 1px solid var(--bc-medium);
|
|
51
|
-
vertical-align: middle;
|
|
52
|
-
color: var(--fc-medium);
|
|
53
|
-
text-align: left;
|
|
54
|
-
|
|
55
|
-
&.s-table--bulk {
|
|
56
|
-
width: calc(var(--su32) - var(--su2));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.s-checkbox {
|
|
60
|
-
display: block;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
th {
|
|
65
|
-
font-weight: bold;
|
|
66
|
-
color: var(--fc-dark);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// Custom styles when in a table head
|
|
70
|
-
thead th {
|
|
71
|
-
vertical-align: bottom;
|
|
72
|
-
white-space: nowrap;
|
|
73
|
-
background-color: var(--black-025);
|
|
74
|
-
line-height: var(--lh-sm);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// When in a table body, don't make it bold.
|
|
78
|
-
tbody th {
|
|
79
|
-
font-weight: normal;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// If it's the last row, add a bottom border
|
|
83
|
-
tr:last-of-type td,
|
|
84
|
-
tr:last-of-type th {
|
|
85
|
-
border-bottom: 1px solid var(--bc-medium);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// If two table bodies are next to each other, visually separate them
|
|
89
|
-
tbody + tbody {
|
|
90
|
-
border-top: var(--su-static2) solid var(--bc-medium);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// ============================================================================
|
|
95
|
-
// $ ALIGNMENTS
|
|
96
|
-
// ----------------------------------------------------------------------------
|
|
97
|
-
.s-table {
|
|
98
|
-
// $$ VERTICAL ALIGNMENT
|
|
99
|
-
// This applies vertical alignment classes to all of a table's cells.
|
|
100
|
-
// ------------------------------------------------------------------------
|
|
101
|
-
// -- TOP
|
|
102
|
-
&.va-top {
|
|
103
|
-
th,
|
|
104
|
-
td {
|
|
105
|
-
vertical-align: top;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// -- MIDDLE
|
|
110
|
-
&.va-middle {
|
|
111
|
-
th,
|
|
112
|
-
td {
|
|
113
|
-
vertical-align: middle;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// -- BOTTOM
|
|
118
|
-
&.va-bottom {
|
|
119
|
-
th,
|
|
120
|
-
td {
|
|
121
|
-
vertical-align: bottom;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// $$ TEXT ALIGNMENT
|
|
126
|
-
// This applies the text alignment classes to all of a table's cells.
|
|
127
|
-
// ------------------------------------------------------------------------
|
|
128
|
-
// -- LEFT ALIGN
|
|
129
|
-
&.ta-left {
|
|
130
|
-
th,
|
|
131
|
-
td {
|
|
132
|
-
text-align: left;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// -- CENTER ALIGN
|
|
137
|
-
&.ta-center {
|
|
138
|
-
th,
|
|
139
|
-
td {
|
|
140
|
-
text-align: center;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// -- RIGHT ALIGN
|
|
145
|
-
&.ta-right {
|
|
146
|
-
th,
|
|
147
|
-
td {
|
|
148
|
-
text-align: right;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// -- JUSTIFY ALIGN
|
|
153
|
-
&.ta-justify {
|
|
154
|
-
th,
|
|
155
|
-
td {
|
|
156
|
-
text-align: justify;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// ============================================================================
|
|
162
|
-
// $ LAYOUT VARIATIONS
|
|
163
|
-
// ----------------------------------------------------------------------------
|
|
164
|
-
.s-table {
|
|
165
|
-
// $$ STRIPES
|
|
166
|
-
// ------------------------------------------------------------------------
|
|
167
|
-
&.s-table__stripes {
|
|
168
|
-
// Darken the header
|
|
169
|
-
thead th {
|
|
170
|
-
background-color: var(--black-050);
|
|
171
|
-
}
|
|
172
|
-
// Add in stripes
|
|
173
|
-
tbody tr:nth-child(even) {
|
|
174
|
-
background-color: var(--black-025);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// $$ SPACING
|
|
179
|
-
// ------------------------------------------------------------------------
|
|
180
|
-
// -- SMALL
|
|
181
|
-
&.s-table__sm {
|
|
182
|
-
th,
|
|
183
|
-
td {
|
|
184
|
-
padding: var(--su4);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
// -- LARGE
|
|
188
|
-
&.s-table__lg {
|
|
189
|
-
th,
|
|
190
|
-
td {
|
|
191
|
-
padding: var(--su12);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// $$ BORDERS
|
|
196
|
-
// ------------------------------------------------------------------------
|
|
197
|
-
// -- No Borders
|
|
198
|
-
&.s-table__b0 {
|
|
199
|
-
th,
|
|
200
|
-
td,
|
|
201
|
-
tr:last-of-type th,
|
|
202
|
-
tr:last-of-type td {
|
|
203
|
-
border-color: transparent;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
// Clear Header Styles
|
|
207
|
-
thead th {
|
|
208
|
-
background-color: transparent;
|
|
209
|
-
text-transform: initial;
|
|
210
|
-
font-size: inherit;
|
|
211
|
-
letter-spacing: initial;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
// This makes the border transparent, so we need to use whitespace
|
|
215
|
-
// to achieve the same effect a 2px gray border achieves.
|
|
216
|
-
tbody + tbody {
|
|
217
|
-
border-color: transparent;
|
|
218
|
-
border-width: var(--su-static12);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// -- Horizontal Only with Table Outline
|
|
223
|
-
&.s-table__bx {
|
|
224
|
-
tr {
|
|
225
|
-
> *:not(:first-child) {
|
|
226
|
-
border-left-color: transparent;
|
|
227
|
-
}
|
|
228
|
-
> *:not(:last-child) {
|
|
229
|
-
border-right-color: transparent;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
// -- Horizontal Only without Table Outline
|
|
235
|
-
&.s-table__bx-simple {
|
|
236
|
-
th,
|
|
237
|
-
td {
|
|
238
|
-
border-left-color: transparent;
|
|
239
|
-
border-right-color: transparent;
|
|
240
|
-
}
|
|
241
|
-
thead th {
|
|
242
|
-
border-top-color: transparent;
|
|
243
|
-
border-bottom-color: var(--bc-darker);
|
|
244
|
-
// Clear Header Styles
|
|
245
|
-
background-color: transparent;
|
|
246
|
-
text-transform: initial;
|
|
247
|
-
font-size: inherit;
|
|
248
|
-
letter-spacing: initial;
|
|
249
|
-
}
|
|
250
|
-
tbody tr {
|
|
251
|
-
&:first-of-type th,
|
|
252
|
-
&:first-of-type td {
|
|
253
|
-
border-top-color: transparent;
|
|
254
|
-
}
|
|
255
|
-
&:last-of-type th,
|
|
256
|
-
&:last-of-type td {
|
|
257
|
-
border-bottom-color: transparent;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
tfoot th,
|
|
261
|
-
tfoot td {
|
|
262
|
-
border-bottom-color: transparent;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
// $$ TOTALS ROW
|
|
267
|
-
// ------------------------------------------------------------------------
|
|
268
|
-
.s-table--totals {
|
|
269
|
-
th,
|
|
270
|
-
td {
|
|
271
|
-
padding-top: var(--su12);
|
|
272
|
-
font-size: var(--fs-subheading);
|
|
273
|
-
font-weight: bold;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
// $$ Sortable Table Columns
|
|
278
|
-
// ------------------------------------------------------------------------
|
|
279
|
-
&.s-table__sortable thead th {
|
|
280
|
-
color: var(--fc-light);
|
|
281
|
-
cursor: pointer;
|
|
282
|
-
|
|
283
|
-
// If an anchor is used, it should appear like a normal header
|
|
284
|
-
a {
|
|
285
|
-
color: inherit;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
// Selected state
|
|
289
|
-
&.is-sorted {
|
|
290
|
-
color: var(--black-900);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
// $$ Progress Bar
|
|
295
|
-
// ------------------------------------------------------------------------
|
|
296
|
-
td.s-table--progress {
|
|
297
|
-
border-right: none;
|
|
298
|
-
text-align: right;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
td.s-table--progress-bar {
|
|
302
|
-
border-left: none;
|
|
303
|
-
padding-left: 0;
|
|
304
|
-
width: 120px;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
// $$ Disabled rows
|
|
308
|
-
// ------------------------------------------------------------------------
|
|
309
|
-
tr.is-disabled {
|
|
310
|
-
background-color: var(--black-025);
|
|
311
|
-
|
|
312
|
-
th:not(.is-enabled),
|
|
313
|
-
td:not(.is-enabled) {
|
|
314
|
-
opacity: 0.3;
|
|
315
|
-
|
|
316
|
-
.highcontrast-mode({
|
|
317
|
-
opacity: 0.8;
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
// ============================================================================
|
|
324
|
-
// $ TABLE CELL SIZES
|
|
325
|
-
// ============================================================================
|
|
326
|
-
// $$ General Column Sizes
|
|
327
|
-
// ----------------------------------------------------------------------------
|
|
328
|
-
@table-columns: (100% / 12);
|
|
329
|
-
|
|
330
|
-
.s-table--cell1 { width: @table-columns * 1; }
|
|
331
|
-
.s-table--cell2 { width: @table-columns * 2; }
|
|
332
|
-
.s-table--cell3 { width: @table-columns * 3; }
|
|
333
|
-
.s-table--cell4 { width: @table-columns * 4; }
|
|
334
|
-
.s-table--cell5 { width: @table-columns * 5; }
|
|
335
|
-
.s-table--cell6 { width: @table-columns * 6; }
|
|
336
|
-
.s-table--cell7 { width: @table-columns * 7; }
|
|
337
|
-
.s-table--cell8 { width: @table-columns * 8; }
|
|
338
|
-
.s-table--cell9 { width: @table-columns * 9; }
|
|
339
|
-
.s-table--cell10 { width: @table-columns * 10; }
|
|
340
|
-
.s-table--cell11 { width: @table-columns * 11; }
|
|
341
|
-
.s-table--cell12 { width: @table-columns * 12; }
|
|
1
|
+
//
|
|
2
|
+
// STACK OVERFLOW
|
|
3
|
+
// TABLES
|
|
4
|
+
//
|
|
5
|
+
// This CSS comes from Stacks, our CSS & Pattern library for rapidly building
|
|
6
|
+
// Stack Overflow. For documentation of all these classes and how to contribute,
|
|
7
|
+
// visit https://stackoverflow.design/
|
|
8
|
+
//
|
|
9
|
+
// TABLE OF CONTENTS
|
|
10
|
+
// • CONTAINER
|
|
11
|
+
// • BASE TABLE STYLE
|
|
12
|
+
// • TABLE ALIGNMENT
|
|
13
|
+
// - Vertical alignment
|
|
14
|
+
// - Text alignment
|
|
15
|
+
// • LAYOUT VARIATIONS
|
|
16
|
+
// - Stripes
|
|
17
|
+
// - Spacing
|
|
18
|
+
// - Borders
|
|
19
|
+
// - Backgrounds
|
|
20
|
+
// - Totals row
|
|
21
|
+
// - Sortable tables
|
|
22
|
+
// • TABLE CELL SIZES
|
|
23
|
+
//
|
|
24
|
+
|
|
25
|
+
// ============================================================================
|
|
26
|
+
// $ CONTAINER
|
|
27
|
+
// Give tables an optional container for responsive scrolling
|
|
28
|
+
// ----------------------------------------------------------------------------
|
|
29
|
+
.s-table-container {
|
|
30
|
+
overflow-x: auto;
|
|
31
|
+
@scrollbar-styles();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// ============================================================================
|
|
35
|
+
// $ BASE TABLE STYLE
|
|
36
|
+
// ----------------------------------------------------------------------------
|
|
37
|
+
.s-table {
|
|
38
|
+
display: table;
|
|
39
|
+
width: 100%;
|
|
40
|
+
max-width: 100%;
|
|
41
|
+
border-collapse: collapse;
|
|
42
|
+
border-spacing: 0;
|
|
43
|
+
font-size: var(--fs-body1);
|
|
44
|
+
|
|
45
|
+
th,
|
|
46
|
+
td {
|
|
47
|
+
padding: var(--su8);
|
|
48
|
+
border-top: 1px solid var(--bc-medium);
|
|
49
|
+
border-left: 1px solid var(--bc-medium);
|
|
50
|
+
border-right: 1px solid var(--bc-medium);
|
|
51
|
+
vertical-align: middle;
|
|
52
|
+
color: var(--fc-medium);
|
|
53
|
+
text-align: left;
|
|
54
|
+
|
|
55
|
+
&.s-table--bulk {
|
|
56
|
+
width: calc(var(--su32) - var(--su2));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.s-checkbox {
|
|
60
|
+
display: block;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
th {
|
|
65
|
+
font-weight: bold;
|
|
66
|
+
color: var(--fc-dark);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Custom styles when in a table head
|
|
70
|
+
thead th {
|
|
71
|
+
vertical-align: bottom;
|
|
72
|
+
white-space: nowrap;
|
|
73
|
+
background-color: var(--black-025);
|
|
74
|
+
line-height: var(--lh-sm);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// When in a table body, don't make it bold.
|
|
78
|
+
tbody th {
|
|
79
|
+
font-weight: normal;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// If it's the last row, add a bottom border
|
|
83
|
+
tr:last-of-type td,
|
|
84
|
+
tr:last-of-type th {
|
|
85
|
+
border-bottom: 1px solid var(--bc-medium);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// If two table bodies are next to each other, visually separate them
|
|
89
|
+
tbody + tbody {
|
|
90
|
+
border-top: var(--su-static2) solid var(--bc-medium);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// ============================================================================
|
|
95
|
+
// $ ALIGNMENTS
|
|
96
|
+
// ----------------------------------------------------------------------------
|
|
97
|
+
.s-table {
|
|
98
|
+
// $$ VERTICAL ALIGNMENT
|
|
99
|
+
// This applies vertical alignment classes to all of a table's cells.
|
|
100
|
+
// ------------------------------------------------------------------------
|
|
101
|
+
// -- TOP
|
|
102
|
+
&.va-top {
|
|
103
|
+
th,
|
|
104
|
+
td {
|
|
105
|
+
vertical-align: top;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// -- MIDDLE
|
|
110
|
+
&.va-middle {
|
|
111
|
+
th,
|
|
112
|
+
td {
|
|
113
|
+
vertical-align: middle;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// -- BOTTOM
|
|
118
|
+
&.va-bottom {
|
|
119
|
+
th,
|
|
120
|
+
td {
|
|
121
|
+
vertical-align: bottom;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// $$ TEXT ALIGNMENT
|
|
126
|
+
// This applies the text alignment classes to all of a table's cells.
|
|
127
|
+
// ------------------------------------------------------------------------
|
|
128
|
+
// -- LEFT ALIGN
|
|
129
|
+
&.ta-left {
|
|
130
|
+
th,
|
|
131
|
+
td {
|
|
132
|
+
text-align: left;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// -- CENTER ALIGN
|
|
137
|
+
&.ta-center {
|
|
138
|
+
th,
|
|
139
|
+
td {
|
|
140
|
+
text-align: center;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// -- RIGHT ALIGN
|
|
145
|
+
&.ta-right {
|
|
146
|
+
th,
|
|
147
|
+
td {
|
|
148
|
+
text-align: right;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// -- JUSTIFY ALIGN
|
|
153
|
+
&.ta-justify {
|
|
154
|
+
th,
|
|
155
|
+
td {
|
|
156
|
+
text-align: justify;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// ============================================================================
|
|
162
|
+
// $ LAYOUT VARIATIONS
|
|
163
|
+
// ----------------------------------------------------------------------------
|
|
164
|
+
.s-table {
|
|
165
|
+
// $$ STRIPES
|
|
166
|
+
// ------------------------------------------------------------------------
|
|
167
|
+
&.s-table__stripes {
|
|
168
|
+
// Darken the header
|
|
169
|
+
thead th {
|
|
170
|
+
background-color: var(--black-050);
|
|
171
|
+
}
|
|
172
|
+
// Add in stripes
|
|
173
|
+
tbody tr:nth-child(even) {
|
|
174
|
+
background-color: var(--black-025);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// $$ SPACING
|
|
179
|
+
// ------------------------------------------------------------------------
|
|
180
|
+
// -- SMALL
|
|
181
|
+
&.s-table__sm {
|
|
182
|
+
th,
|
|
183
|
+
td {
|
|
184
|
+
padding: var(--su4);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
// -- LARGE
|
|
188
|
+
&.s-table__lg {
|
|
189
|
+
th,
|
|
190
|
+
td {
|
|
191
|
+
padding: var(--su12);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// $$ BORDERS
|
|
196
|
+
// ------------------------------------------------------------------------
|
|
197
|
+
// -- No Borders
|
|
198
|
+
&.s-table__b0 {
|
|
199
|
+
th,
|
|
200
|
+
td,
|
|
201
|
+
tr:last-of-type th,
|
|
202
|
+
tr:last-of-type td {
|
|
203
|
+
border-color: transparent;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// Clear Header Styles
|
|
207
|
+
thead th {
|
|
208
|
+
background-color: transparent;
|
|
209
|
+
text-transform: initial;
|
|
210
|
+
font-size: inherit;
|
|
211
|
+
letter-spacing: initial;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// This makes the border transparent, so we need to use whitespace
|
|
215
|
+
// to achieve the same effect a 2px gray border achieves.
|
|
216
|
+
tbody + tbody {
|
|
217
|
+
border-color: transparent;
|
|
218
|
+
border-width: var(--su-static12);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// -- Horizontal Only with Table Outline
|
|
223
|
+
&.s-table__bx {
|
|
224
|
+
tr {
|
|
225
|
+
> *:not(:first-child) {
|
|
226
|
+
border-left-color: transparent;
|
|
227
|
+
}
|
|
228
|
+
> *:not(:last-child) {
|
|
229
|
+
border-right-color: transparent;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// -- Horizontal Only without Table Outline
|
|
235
|
+
&.s-table__bx-simple {
|
|
236
|
+
th,
|
|
237
|
+
td {
|
|
238
|
+
border-left-color: transparent;
|
|
239
|
+
border-right-color: transparent;
|
|
240
|
+
}
|
|
241
|
+
thead th {
|
|
242
|
+
border-top-color: transparent;
|
|
243
|
+
border-bottom-color: var(--bc-darker);
|
|
244
|
+
// Clear Header Styles
|
|
245
|
+
background-color: transparent;
|
|
246
|
+
text-transform: initial;
|
|
247
|
+
font-size: inherit;
|
|
248
|
+
letter-spacing: initial;
|
|
249
|
+
}
|
|
250
|
+
tbody tr {
|
|
251
|
+
&:first-of-type th,
|
|
252
|
+
&:first-of-type td {
|
|
253
|
+
border-top-color: transparent;
|
|
254
|
+
}
|
|
255
|
+
&:last-of-type th,
|
|
256
|
+
&:last-of-type td {
|
|
257
|
+
border-bottom-color: transparent;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
tfoot th,
|
|
261
|
+
tfoot td {
|
|
262
|
+
border-bottom-color: transparent;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// $$ TOTALS ROW
|
|
267
|
+
// ------------------------------------------------------------------------
|
|
268
|
+
.s-table--totals {
|
|
269
|
+
th,
|
|
270
|
+
td {
|
|
271
|
+
padding-top: var(--su12);
|
|
272
|
+
font-size: var(--fs-subheading);
|
|
273
|
+
font-weight: bold;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// $$ Sortable Table Columns
|
|
278
|
+
// ------------------------------------------------------------------------
|
|
279
|
+
&.s-table__sortable thead th {
|
|
280
|
+
color: var(--fc-light);
|
|
281
|
+
cursor: pointer;
|
|
282
|
+
|
|
283
|
+
// If an anchor is used, it should appear like a normal header
|
|
284
|
+
a {
|
|
285
|
+
color: inherit;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// Selected state
|
|
289
|
+
&.is-sorted {
|
|
290
|
+
color: var(--black-900);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// $$ Progress Bar
|
|
295
|
+
// ------------------------------------------------------------------------
|
|
296
|
+
td.s-table--progress {
|
|
297
|
+
border-right: none;
|
|
298
|
+
text-align: right;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
td.s-table--progress-bar {
|
|
302
|
+
border-left: none;
|
|
303
|
+
padding-left: 0;
|
|
304
|
+
width: 120px;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// $$ Disabled rows
|
|
308
|
+
// ------------------------------------------------------------------------
|
|
309
|
+
tr.is-disabled {
|
|
310
|
+
background-color: var(--black-025);
|
|
311
|
+
|
|
312
|
+
th:not(.is-enabled),
|
|
313
|
+
td:not(.is-enabled) {
|
|
314
|
+
opacity: 0.3;
|
|
315
|
+
|
|
316
|
+
.highcontrast-mode({
|
|
317
|
+
opacity: 0.8;
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// ============================================================================
|
|
324
|
+
// $ TABLE CELL SIZES
|
|
325
|
+
// ============================================================================
|
|
326
|
+
// $$ General Column Sizes
|
|
327
|
+
// ----------------------------------------------------------------------------
|
|
328
|
+
@table-columns: (100% / 12);
|
|
329
|
+
|
|
330
|
+
.s-table--cell1 { width: @table-columns * 1; }
|
|
331
|
+
.s-table--cell2 { width: @table-columns * 2; }
|
|
332
|
+
.s-table--cell3 { width: @table-columns * 3; }
|
|
333
|
+
.s-table--cell4 { width: @table-columns * 4; }
|
|
334
|
+
.s-table--cell5 { width: @table-columns * 5; }
|
|
335
|
+
.s-table--cell6 { width: @table-columns * 6; }
|
|
336
|
+
.s-table--cell7 { width: @table-columns * 7; }
|
|
337
|
+
.s-table--cell8 { width: @table-columns * 8; }
|
|
338
|
+
.s-table--cell9 { width: @table-columns * 9; }
|
|
339
|
+
.s-table--cell10 { width: @table-columns * 10; }
|
|
340
|
+
.s-table--cell11 { width: @table-columns * 11; }
|
|
341
|
+
.s-table--cell12 { width: @table-columns * 12; }
|