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
|
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */
tree {
display: block;
outline: none;
overflow: auto;
}
.tree-item > .tree-row {
-webkit-user-select: none;
background-color: rgba(255, 255, 255, 0);
border: 1px solid rgba(255, 255, 255, 0); /* transparent white */
border-radius: 2px;
color: black;
cursor: default;
line-height: 28px;
padding: 0 3px;
position: relative;
white-space: nowrap;
}
.expand-icon {
-webkit-transform: rotate(-90deg);
-webkit-transition: all 150ms;
background-image: -webkit-canvas(tree-triangle);
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: 8px 5px;
display: inline-block;
height: 16px;
opacity: .6;
position: relative;
top: 6px;
vertical-align: top;
width: 16px;
}
html[dir=rtl] .expand-icon {
-webkit-transform: rotate(90deg);
}
.tree-item[expanded] > .tree-row > .expand-icon {
-webkit-transform: rotate(0);
background-image: -webkit-canvas(tree-triangle);
opacity: .5;
}
.tree-row .expand-icon {
visibility: hidden;
}
.tree-row[may-have-children] .expand-icon {
visibility: visible;
}
.tree-row[has-children=false] .expand-icon {
visibility: hidden;
}
.tree-row:hover {
background-color: hsl(214, 91%, 97%);
border-color: hsl(214, 91%, 85%);
z-index: 1;
}
/*
WebKit has a bug with attribute selectors so we apply selected to the tree row
as well.
https://bugs.webkit.org/show_bug.cgi?id=12519
*/
.tree-row[selected] {
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.8),
rgba(255,255,255,0));
}
.tree-row[selected] {
background-color: hsl(0, 0%, 90%);
border-color: hsl(0, 0%, 85%);
z-index: 2;
}
.tree-row[selected]:hover,
tree:focus .tree-row[selected] {
background-color: hsl(214, 91%, 89%);
border-color: rgb(125, 162, 206);
}
.tree-children[expanded] {
display: block;
}
.tree-children {
display: none;
}
.tree-item > .tree-row > * {
box-sizing: border-box;
display: inline-block;
}
.tree-label {
-webkit-padding-start: 20px;
background-position: 0 50%;
background-repeat: no-repeat;
white-space: pre;
}
html[dir=rtl] .tree-label {
background-position: 100% 50%;
}
html[dir=rtl] .tree-label,
html[dir=rtl] .tree-row[may-have-children] > .tree-label {
background-image: -webkit-image-set(
url('../../../resources/default_100_percent/common/folder_closed_rtl.png') 1x,
url('../../../resources/default_200_percent/common/folder_closed_rtl.png') 2x);
}
html[dir=rtl] .tree-item[expanded] > .tree-row > .tree-label {
background-image: -webkit-image-set(
url('../../../resources/default_100_percent/common/folder_open_rtl.png') 1x,
url('../../../resources/default_200_percent/common/folder_open_rtl.png') 2x);
}
tree[icon-visibility=hidden] .tree-label {
-webkit-padding-start: 0;
background-image: none !important;
}
tree[icon-visibility=parent] .tree-label,
tree[icon-visibility=parent] .tree-row[has-children=false] > .tree-label {
background-image: none;
}
.tree-label,
.tree-row[may-have-children] > .tree-label {
background-image: -webkit-image-set(
url('../../../resources/default_100_percent/common/folder_closed.png') 1x,
url('../../../resources/default_200_percent/common/folder_closed.png') 2x);
}
.tree-item[expanded] > .tree-row > .tree-label {
background-image: -webkit-image-set(
url('../../../resources/default_100_percent/common/folder_open.png') 1x,
url('../../../resources/default_200_percent/common/folder_open.png') 2x);
}
/* We need to ensure that even empty labels take up space */
.tree-label:empty::after {
content: ' ';
white-space: pre;
}
.tree-rename > .tree-row > .tree-label {
-webkit-user-modify: read-write-plaintext-only;
-webkit-user-select: auto;
background: white;
color: black;
outline: 1px solid black;
}
.tree-item[editing] input {
/* Do not inherit the line-height */
font-family: inherit;
font-size: inherit;
font-weight: inherit;
margin: -2px -8px -2px -3px;
<if expr="not is_macosx and not is_ios">
outline: none;
</if>
padding: 1px 7px 1px 1px;
}
html[dir=rtl] .tree-item[editing] input {
margin: -2px -3px -2px -8px;
padding: 1px 1px 1px 7px;
}
|