-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathtable.css
More file actions
42 lines (36 loc) · 683 Bytes
/
table.css
File metadata and controls
42 lines (36 loc) · 683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table#displaying_large_tables_in_small_spaces */
@media (max-width: 768px) {
table {
white-space: nowrap;
}
}
table {
width: 100%;
margin: 0 auto;
display: block;
overflow-x: auto;
border-spacing: 0;
}
th,
td {
border-top-width: 0;
border-left-width: 0;
padding: 0.25rem 0.5rem;
}
th {
vertical-align: bottom;
}
th:last-child,
td:last-child {
border-right-width: 0;
}
tr:last-child td {
border-bottom-width: 0;
}
tr td:first-child,
tr th:first-child {
position: sticky;
left: 0;
background: var(--color-background-secondary);
z-index: 1;
}