forked from mui/base-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTable.css
More file actions
89 lines (76 loc) · 2.05 KB
/
Copy pathTable.css
File metadata and controls
89 lines (76 loc) · 2.05 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
@layer components {
.TableRoot {
font-size: var(--font-size-14);
line-height: 1.25rem;
color: var(--gray-t1);
border: 1px solid var(--gray-c2);
border-collapse: separate;
border-radius: var(--radius-6);
white-space: nowrap;
overflow: hidden;
}
.TableRootTable {
table-layout: fixed;
width: 100%;
vertical-align: top;
/* Tailwind's border-collapse: collapse causes alpha blending issues in Safari */
border-collapse: separate;
border-spacing: 0;
}
.TableHead,
.TableBody {
vertical-align: inherit;
}
.TableColumnHeader {
text-align: initial;
font-weight: var(--font-weight-400);
color: var(--color-foreground);
background-color: var(--gray-s2);
border-bottom: 1px solid var(--gray-c2);
}
.TableCell {
text-align: initial;
font-weight: var(--font-weight-400);
:not(:last-child) > & {
border-bottom: 1px solid var(--gray-c2);
}
&[data-scrollable] {
position: relative;
/* Overscroll overlay */
&::after {
content: '';
position: absolute;
pointer-events: none;
top: 1px;
bottom: 1px;
right: -1px; /* Browsers may miss half a pixel due to subpixel table cell widths */
width: 1.25rem;
background-image: linear-gradient(to right, transparent, var(--color-content));
animation: table-cell-overscroll-overlay 500ms;
}
/* Only applied when the container is scrollable as this creates a layer. */
& .TableCellInner {
/* Prevent Chrome/Safari page navigation gestures when scrolling horizontally */
overscroll-behavior-x: contain;
}
}
}
@keyframes table-cell-overscroll-overlay {
from {
opacity: 0;
}
}
.TableCellInner {
/* Ensure consistent height of the cells */
display: flex;
align-items: center;
min-height: 2.5rem;
padding: 0.5rem 0.75rem;
/* Make individual cells scrollable */
overflow-x: auto;
scrollbar-width: none;
&::-webkit-scrollbar {
display: none;
}
}
}