-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtable.css
More file actions
103 lines (84 loc) · 1.42 KB
/
table.css
File metadata and controls
103 lines (84 loc) · 1.42 KB
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
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
:root {
}
table {
--head-height: 41px;
caption {
font-size: 0.8em;
color: dimgray;
background-color: #d3d3d3;
margin: 0;
caption-side: top;
vertical-align: middle;
width: 0;
min-width: 100%;
position: sticky;
top: var(--head-height);
z-index: 10;
}
}
th, td {
text-align: left;
border: 1px solid #d3d3d3;
}
th {
background-color: var(--header-background-color);
color: #666;
border-bottom: 1px solid #d3d3d3;
}
thead {
th {
--th-height: var(--head-height);
position: sticky;
top: var(--th-height);
z-index: 10;
}
}
caption + thead th {
--th-height: calc(var(--head-height) + 1.2em);
}
table {
--header-background-color: light-dark(#e8e8e8, #2f2f2f);
border-collapse: separate;
border-spacing: 0;
position: relative;
z-index: 1;
}
tbody {
max-height: 80vh;
overflow: visible;
box-shadow: inset 0 .3em 1em 0 rgba(0, 0, 1, .21);
overflow-y: auto;
overflow-x: hidden
}
table.no-border {
border: none;
tbody {
box-shadow: none;
}
td {
border: none;
}
}
.scrollable table {
width: 200%;
}
td, th {
width: auto;
padding: .4em .7em;
}
.image-container td, .left td, .left .side td, .right td, .right .side td {
height: 100%
}
@media (min-width: 60em) {
table {
--head-height: 99px;
}
}
@media (prefers-color-scheme: dark) {
td, th {
border-color: grey;
}
th {
background-color: #2f2f2f;
}
}