-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtable_formatting.css
58 lines (50 loc) · 1.05 KB
/
table_formatting.css
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
div:has(> table) {
max-height: 300px;
overflow-y: auto;
position: relative;
}
table {
border-collapse: separate;
border-spacing: 0;
width: 100%;
}
table thead {
position: sticky;
top: 0;
z-index: 2;
background-color: var(--background-secondary);
}
table th, table td {
padding: 8px;
border: 1px solid var(--background-modifier-border);
}
table th {
background-color: var(--background-secondary);
}
/* Ensure all header cells have the same background */
table thead th {
background-color: var(--background-secondary) !important;
}
table thead::before {
content: '';
position: absolute;
left: 0;
right: 0;
top: -1px;
bottom: 0;
background-color: var(--background-secondary);
z-index: -1;
}
table thead::after {
content: '';
position: absolute;
left: 0;
right: 0;
bottom: -1px;
height: 2px;
background-color: var(--background-modifier-border);
}
table tbody {
position: relative;
z-index: 0;
}