forked from olton/metroui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtreeview.less
More file actions
127 lines (109 loc) · 1.65 KB
/
treeview.less
File metadata and controls
127 lines (109 loc) · 1.65 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
@import (once) "variables";
@import (once) "utils";
// leaf
// node
.treeview {
margin: 0;
padding: 0;
display: block;
font-size: .75rem;
ul {
margin: 0;
padding: 0;
list-style: none;
width: 100%;
font-size: inherit;
}
li {
font-size: inherit;
padding: 2px 16px;
cursor: pointer;
position: relative;
color: @gray;
vertical-align: middle;
.no-user-select;
&.active > .leaf {
font-weight: bold;
}
&.disabled {
cursor: default;
color: @grayLight;
&:hover > .leaf {
color: @grayLight;
}
}
}
li {
.input-control {
margin: 0 .3125rem 0 0;
height: 1rem;
line-height: .625rem;
min-height: 0;
.check {
line-height: 1rem;
}
}
}
ul > li > .leaf {
&:hover {
color: @dark;
}
}
.leaf {
vertical-align: middle;
display: inline-block;
color: inherit;
}
.leaf {
.icon {
width: 1rem;
height: 1rem;
text-align: center;
}
}
.node-toggle {
position: absolute;
left: 0;
top: 8px;
width: 8px;
height: 8px;
&:before {
position: absolute;
display: block;
left: 0;
top: -3px;
height: 0;
content: '';
width: 0;
border-left: 7px solid transparent;
border-top: 7px solid transparent;
border-bottom: 7px @cyan solid;
}
}
li:hover > .node-toggle {
&:before {
border-bottom-color: @darkCyan;
}
}
.node {
&.collapsed {
& > .node-toggle {
&:before {
left: -4px;
.rotate-45;
border-bottom-color: @grayLight;
}
}
&:hover {
& > .node-toggle {
&:before {
border-bottom-color: @darkCyan;
}
}
}
& > ul {
display: none;
}
}
}
}