-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfoldable-table.css
More file actions
111 lines (100 loc) · 2.67 KB
/
foldable-table.css
File metadata and controls
111 lines (100 loc) · 2.67 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
104
105
106
107
108
109
110
111
.foldable-table {
position: relative;
}
.foldable-table .branch {
}
/* indent internal branches */
.foldable-table .branch .branch {
padding-left: 1em;
}
/* hide folded branch's sub-branches */
.foldable-table .branch.folded .branch {
display: none;
}
.foldable-table .branch .row .link {
display: inline-block;
vertical-align: middle;
}
.foldable-table .branch .row:hover::before {
content: "x";
display: block;
min-height: 3px;
position: absolute;
text-indent: -5ex;
overflow: hidden;
left: 0;
right: 0;
background: #f0f0f0;
z-index: -1;
white-space: nowrap;
}
/* folding icon */
.foldable-table .branch .row .toggle-fold {
display: inline-block;
text-align: center;
width: 1em;
text-decoration: none;
xbackground: #c0c0c0;
margin-right: 0.4ex;
}
.foldable-table.with-icons .branch .row .toggle-fold {
width: 9px;
height: 9px;
vertical-align: middle;
margin-right: 0.8ex;
}
/* format the fold/unfold icons */
.foldable-table.with-icons .branch .row .toggle-fold span {
display: inline-block;
width: 9px;
height: 9px;
overflow: hidden;
text-indent: -10ex;
vertical-align: top;
}
.foldable-table.with-icons .branch .row .toggle-fold span.fold {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAgMAAACd/+6DAAAACVBMVEUAAFMAAACAgICmUBoBAAAAAXRSTlMAQObYZgAAABRJREFUCFtjWLWqgQEZtoag8oHyAMaPCwKI/mdQ);
}
.foldable-table.with-icons .branch .row .toggle-fold span.unfold {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAgMAAACd/+6DAAAACVBMVEUAAFQAAACAgIBj9ySPAAAAAXRSTlMAQObYZgAAABhJREFUCFtjWLWqgQEMHSC4NQTBBkGgPADYjwwCiEZCiQAAAABJRU5ErkJggg==);
}
/* normally, show the unfold action icon */
.foldable-table .branch > .row .toggle-fold span.fold {
display: inline-block;
}
.foldable-table .branch > .row .toggle-fold span.unfold {
display: none;
}
/* when unfolded, show the fold action icon */
.foldable-table .branch.folded > .row .toggle-fold .fold {
display: none;
}
.foldable-table .branch.folded > .row .toggle-fold .unfold {
display: inline-block;
}
.foldable-table .main {
flex-grow: 1;
}
.foldable-table .header {
background: #000000;
color: #ffffff;
font-weight: bold;
}
.foldable-table .row {
display: flex;
padding: 0.2em 0;
}
.foldable-table .branch .row:hover::before {
padding: 0.2em 0;
}
.foldable-table .col {
width: 10em;
text-align: center;
}
.foldable-table .row .main a.link {
text-decoration: none;
color: inherit;
}
.foldable-table .row .main a[href].link:hover {
text-decoration: underline;
}