-
Notifications
You must be signed in to change notification settings - Fork 171
/
Copy path_patterns_list-tree.scss
93 lines (76 loc) · 1.88 KB
/
_patterns_list-tree.scss
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
@import 'settings';
@mixin vf-p-list-tree {
$list-tree-toggle-icon-size: 1rem;
$list-tree-item-indent-size: calc($sph--x-large + map-get($icon-sizes, small) / 2);
%list-tree-icon {
content: ' ';
display: block;
height: $list-tree-toggle-icon-size;
left: 0;
pointer-events: none;
position: absolute;
top: 0.3rem;
width: $list-tree-toggle-icon-size;
}
%list-tree-expand-icon {
@extend %list-tree-icon;
@include vf-icon-chevron-right-themed;
}
%list-tree-collapse-icon {
@extend %list-tree-icon;
@include vf-icon-chevron-down-themed;
}
.p-list-tree__link,
.p-list-tree__toggle {
color: $colors--theme--text-default;
cursor: pointer;
&:hover {
color: $colors--theme--link-default;
text-decoration: underline;
}
&.is-active {
color: $colors--theme--link-default;
}
}
.p-list-tree {
list-style-type: none;
margin-left: $sp-x-small;
padding-left: $sph--small;
.p-list-tree {
display: none;
margin: 0;
padding: 0;
&[aria-hidden='false'] {
display: block;
}
&[aria-hidden='false']::before {
@extend %list-tree-collapse-icon;
}
}
}
.p-list-tree__item {
@include vf-focus-themed;
margin-top: $sp-xx-small;
padding-left: $list-tree-item-indent-size;
position: relative;
}
.p-list-tree__toggle[aria-expanded='false'] {
&::before {
@extend %list-tree-expand-icon;
}
}
.p-list-tree__toggle {
@include vf-focus-themed;
background: transparent;
border: 0;
font-weight: normal;
margin: 0 0 0 (-$list-tree-item-indent-size);
padding: 0 $sph--small 0 $list-tree-item-indent-size;
transition-duration: 0s;
// Hide the default button styling for toggles
&[aria-expanded='true'],
&:hover {
background: $colors--theme--background-default;
}
}
}