-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharcTree.css
295 lines (256 loc) · 5.88 KB
/
arcTree.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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
:root {
--arctree-curves: #777;
--arctree-ball-collapsed-color: rgb(1, 108, 90);
--arctree-ball-expanded-color: rgb(106, 53, 171);
--arctree-object-color: #3625b9;
--arctree-dummy-color: rgb(129, 129, 129);
}
#arctree-container {
padding: 10px;
border: 1px solid #7c7c7c;
border-radius: 0.3em;
margin: 20px;
font-family: sans-serif;
}
/* ================================= */
/* Tree Options */
#arctree-options {
padding: 15px;
max-width: 600px;
min-width: 180px;
background-color: #f3f2f2;
border-radius: 0.3em;
border: #505050 1px solid;
}
#arctree-options div {
font-size: large;
font-weight: bold;
}
#arctree-options input {
margin: 5px;
background-color: rgb(168, 168, 168);
border: 1px solid transparent;
border-radius: 0.5rem;
box-sizing: border-box;
cursor: pointer;
flex: 0 0 auto;
font-weight: 600;
line-height: 1.3rem;
padding: 0.25rem 1.2rem;
text-align: center;
text-decoration: none #6b7280 solid;
text-decoration-thickness: auto;
transition-property: background-color, border-color, color, fill, stroke;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
width: auto;
/*
transition-duration: 2.5s;
box-shadow:
rgba(44, 187, 99, 0.2) 0 -25px 18px -14px inset,
rgba(44, 187, 99, 0.15) 0 1px 2px,
rgba(44, 187, 99, 0.15) 0 2px 4px,
rgba(44, 187, 99, 0.15) 0 4px 8px,
rgba(44, 187, 99, 0.15) 0 8px 16px,
rgba(44, 187, 99, 0.15) 0 16px 32px;
*/
display: inline-block;
transition: all 400ms;
}
#arctree-options [type="button"] {
color: rgb(255, 255, 255);
}
#arctree-options input:hover {
box-shadow: rgba(69, 103, 187, 0.35) 0 -25px 18px -14px inset,
rgba(69, 103, 187, 0.35) 0 1px 2px, rgba(69, 103, 187, 0.35) 0 2px 4px,
rgba(69, 103, 187, 0.35) 0 4px 8px, rgba(69, 103, 187, 0.35) 0 8px 16px,
rgba(69, 103, 187, 0.35) 0 16px 32px;
transform: scale(1.05) rotate(-1deg);
background-color: #374151;
}
#arctree-options input:focus {
box-shadow: none;
outline: 2px solid transparent;
outline-offset: 2px;
}
#arctree-font-size-label {
font-size: medium;
margin-top: 20px;
}
#arctree-font-size {
width: 220px;
margin-top: 50px;
}
#arctree-font-size-value {
width: 2em;
display: inline-block;
/*background-color: #e5e5e5;
border: #aaa 1px solid;*/
padding: 2px;
}
#arctree-file {
margin: 10px 5px;
}
#arctree-file-label {
font-weight: 700;
}
/* ================================= */
/* Thx to https://codepen.io/bisserof/pen/nrMveb */
/* Core Tree Styles */
.arctree {
margin: 0px;
padding: 20px;
border: 1px solid #a6a6a6;
border-radius: 0.3em;
}
.arctree ul {
/*list-style-type: none;*/
padding: 0;
margin: 0;
/*background-color: #f3dd37;*/
}
/* for long 1st node that goes several lines long */
.arctree li {
list-style-type: none;
}
.arctree input {
position: absolute;
clip-path: inset(0 0 0 0);
}
.arctree input ~ ul {
display: none;
}
.arctree input:checked ~ ul {
display: block;
}
/* Tree rows */
.arctree li {
line-height: 1.2;
position: relative;
padding: 0 0 1em 1em;
}
.arctree ul li {
padding: 1em 0 0 1em;
}
.arctree > li:last-child {
padding-bottom: 0;
}
/* Tree labels */
.arctree-label {
position: relative;
display: inline-block;
/* HACK: white background just hides the checkmark boxes; still seen if font size < 1 */
background: #fff;
color: #000;
}
label.arctree-label {
cursor: pointer;
}
label.arctree-label:hover {
color: #666;
}
/* Tree expanded icon */
label.arctree-label:before {
background: var(--arctree-ball-expanded-color);
color: #fff;
position: relative;
z-index: 1;
float: left;
margin: 0 1em 0 -2em;
width: 1em;
height: 1em;
border-radius: 1em;
content: "+";
text-align: center;
line-height: 0.9em;
}
/* Tree collapsed icon */
:checked ~ label.arctree-label:before {
content: "–";
background: var(--arctree-ball-collapsed-color);
}
/* Tree branches */
.arctree li:before {
position: absolute;
top: 0;
bottom: 0;
left: -0.5em;
display: block;
width: 0;
border-left: 1px solid var(--arctree-curves);
content: "";
/* background-color: #f3dd37; */
}
.arctree-label:after {
position: absolute;
top: 0;
left: -1.5em;
display: block;
height: 0.5em;
width: 1em;
border-bottom: 1px solid var(--arctree-curves); /* line extending right to the child, at child level */
border-left: 1px solid var(--arctree-curves); /* vertical segment at bottom of the drop & curving into above lines */
border-radius: 0 0 0 0.3em;
content: "";
/* background-color: #48c1fe; */
}
label.arctree-label:after {
border-bottom: 0;
}
:checked ~ label.arctree-label:after {
border-radius: 0 0.3em 0 0;
border-top: 1px solid var(--arctree-curves); /* line extending right from + - marker */
border-right: 1px solid var(--arctree-curves); /* initial drop, from above line */
border-bottom: 0;
border-left: 0;
bottom: 0;
top: 0.5em;
height: auto;
}
/* Tree leaves - needed??? */
.arctree li:last-child:before {
height: 1em;
bottom: auto;
/*background-color: #48c1fe;*/
}
.arctree > li:last-child:before {
display: none;
/* background-color: #48c1fe;*/
}
.arctree-dummy-node {
color: var(--arctree-dummy-color);
border-radius: 0.5rem;
padding: 0.5rem;
background-color: #ebebeb;
opacity: 0.8;
}
.arctree-dummy-node a:link {
color: #844163;
text-decoration: none;
}
.arctree-dummy-node a:visited {
color: #5c203e;
text-decoration: none;
}
.arctree-dummy-node a:hover {
color: #844163;
font-weight: bold;
/*text-decoration: none;*/
}
.arctree-dummy-node a:active {
color: #c43a7f;
font-weight: bold;
/*text-decoration: none;*/
}
.arctree-dummy-ul {
list-style-type: none;
color: var(--arctree-dummy-color);
border-radius: 0.5rem;
padding: 0.5rem;
/*background-color: #b6d671;*/
}
.arctree-object {
color: var(--arctree-object-color);
}